File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -797,15 +797,20 @@ async function run(startedAt: Date) {
797797 ) ;
798798}
799799
800+ /**
801+ * Loads [repository properties](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization) if applicable.
802+ */
800803async function loadRepositoryProperties (
801804 repositoryNwo : RepositoryNwo ,
802805 gitHubVersion : GitHubVersion ,
803806 features : FeatureEnablement ,
804807 logger : Logger ,
805808) : Promise < Result < RepositoryProperties , unknown > > {
809+ // See if we can skip loading repository properties early. In particular,
810+ // repositories owned by users cannot have repository properties, so we can
811+ // skip the API call entirely in that case.
806812 const repositoryOwnerType = github . context . payload . repository ?. owner . type ;
807813 if ( repositoryOwnerType === "User" ) {
808- // Users cannot have repository properties, so skip the API call.
809814 logger . debug (
810815 "Skipping loading repository properties because the repository is owned by a user and " +
811816 "therefore cannot have repository properties." ,
You can’t perform that action at this time.
0 commit comments