@@ -2,7 +2,6 @@ import * as fs from "fs";
22import * as path from "path" ;
33
44import * as core from "@actions/core" ;
5- import * as github from "@actions/github" ;
65import * as io from "@actions/io" ;
76import * as semver from "semver" ;
87import { v4 as uuidV4 } from "uuid" ;
@@ -41,10 +40,7 @@ import {
4140} from "./diagnostics" ;
4241import { EnvVar } from "./environment" ;
4342import { Feature , FeatureEnablement , initFeatures } from "./feature-flags" ;
44- import {
45- loadPropertiesFromApi ,
46- RepositoryProperties ,
47- } from "./feature-flags/properties" ;
43+ import { loadRepositoryProperties } from "./feature-flags/properties" ;
4844import {
4945 checkInstallPython311 ,
5046 checkPacksForOverlayCompatibility ,
@@ -62,7 +58,7 @@ import {
6258 OverlayBaseDatabaseDownloadStats ,
6359} from "./overlay/caching" ;
6460import { OverlayDatabaseMode } from "./overlay/overlay-database-mode" ;
65- import { getRepositoryNwo , RepositoryNwo } from "./repository" ;
61+ import { getRepositoryNwo } from "./repository" ;
6662import { ToolsSource } from "./setup-codeql" ;
6763import {
6864 ActionName ,
@@ -94,10 +90,7 @@ import {
9490 checkActionVersion ,
9591 getErrorMessage ,
9692 BuildMode ,
97- Result ,
9893 getOptionalEnvVar ,
99- Success ,
100- Failure ,
10194} from "./util" ;
10295import { checkWorkflow } from "./workflow" ;
10396
@@ -805,38 +798,6 @@ async function run(
805798 ) ;
806799}
807800
808- /**
809- * Loads [repository properties](https://docs.github.com/en/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization) if applicable.
810- */
811- async function loadRepositoryProperties (
812- repositoryNwo : RepositoryNwo ,
813- logger : Logger ,
814- ) : Promise < Result < RepositoryProperties , unknown > > {
815- // See if we can skip loading repository properties early. In particular,
816- // repositories owned by users cannot have repository properties, so we can
817- // skip the API call entirely in that case.
818- const repositoryOwnerType = github . context . payload . repository ?. owner . type ;
819- logger . debug (
820- `Repository owner type is '${ repositoryOwnerType ?? "unknown" } '.` ,
821- ) ;
822- if ( repositoryOwnerType === "User" ) {
823- logger . debug (
824- "Skipping loading repository properties because the repository is owned by a user and " +
825- "therefore cannot have repository properties." ,
826- ) ;
827- return new Success ( { } ) ;
828- }
829-
830- try {
831- return new Success ( await loadPropertiesFromApi ( logger , repositoryNwo ) ) ;
832- } catch ( error ) {
833- logger . warning (
834- `Failed to load repository properties: ${ getErrorMessage ( error ) } ` ,
835- ) ;
836- return new Failure ( error ) ;
837- }
838- }
839-
840801async function recordZstdAvailability (
841802 config : configUtils . Config ,
842803 zstdAvailability : ZstdAvailability ,
0 commit comments