Skip to content

Commit

Permalink
Add override for code scanning analysis of default branch
Browse files Browse the repository at this point in the history
  • Loading branch information
charisk committed Mar 23, 2023
1 parent 04f256d commit 94cc1de
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
9 changes: 7 additions & 2 deletions lib/actions-util.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/actions-util.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/actions-util.test.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/actions-util.test.js.map

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

4 changes: 4 additions & 0 deletions src/actions-util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ test("initializeEnvironment", (t) => {
});

test("isAnalyzingDefaultBranch()", async (t) => {
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "true";
t.deepEqual(await actionsutil.isAnalyzingDefaultBranch(), true);
process.env["CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH"] = "false";

await withTmpDir(async (tmpDir) => {
setupActionsVars(tmpDir, tmpDir);
const envFile = path.join(tmpDir, "event.json");
Expand Down
Loading

0 comments on commit 94cc1de

Please sign in to comment.