Prefer accessing context via @actions/github

This commit is contained in:
Henry Mercer
2026-01-27 15:00:52 +00:00
parent d9e374ef85
commit 9fda641d8d
3 changed files with 1989 additions and 1990 deletions
-3
View File
@@ -159,9 +159,6 @@ inputs:
description: >-
Explicitly enable or disable caching of project build dependencies.
required: false
repository-owner-type:
default: ${{ github.event.repository.owner.type }}
required: false
outputs:
codeql-path:
description: The path of the CodeQL binary used for analysis
+1987 -1986
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -2,6 +2,7 @@ import * as fs from "fs";
import * as path from "path";
import * as core from "@actions/core";
import * as github from "@actions/github";
import * as io from "@actions/io";
import * as semver from "semver";
import { v4 as uuidV4 } from "uuid";
@@ -802,7 +803,7 @@ async function loadRepositoryProperties(
features: FeatureEnablement,
logger: Logger,
): Promise<Result<RepositoryProperties, unknown>> {
const repositoryOwnerType = getOptionalInput("repository-owner-type");
const repositoryOwnerType = github.context.payload.repository?.owner.type;
if (repositoryOwnerType === "User") {
// Users cannot have repository properties, so skip the API call.
logger.debug(