mirror of
https://github.com/github/codeql-action
synced 2026-05-23 20:00:54 +03:00
Prefer accessing context via @actions/github
This commit is contained in:
@@ -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
|
||||
|
||||
Generated
+1987
-1986
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user