Skip to content

Commit

Permalink
Debug: print github.context.payload
Browse files Browse the repository at this point in the history
  • Loading branch information
angelapwen committed Jan 16, 2024
1 parent 93b17c6 commit a6283b8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
7 changes: 3 additions & 4 deletions lib/init-action-post-helper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init-action-post-helper.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions src/init-action-post-helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as core from "@actions/core";
import * as github from "@actions/github";

import * as actionsUtil from "./actions-util";
import { getApiClient } from "./api-client";
Expand Down Expand Up @@ -186,12 +187,10 @@ export async function run(

// We do not delete uploaded SARIFs if we're on a fork, as we're missing the
// appropriate permissions.
core.info(`GITHUB_ACTOR is ${process.env["GITHUB_ACTOR"]}`);
core.info(`repositoryNwo.owner is ${repositoryNwo.owner}`);
if (
process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true" &&
repositoryNwo.owner === "github"
) {
core.info(
`github.context.payload is ${JSON.stringify(github.context.payload)}`,
);
if (process.env["CODEQL_ACTION_EXPECT_UPLOAD_FAILED_SARIF"] === "true") {
await removeUploadedSarif(uploadFailedSarifResult, logger);
}

Expand Down

0 comments on commit a6283b8

Please sign in to comment.