Skip to content

Commit

Permalink
Merge pull request #1603 from github/charisk/default-branch-analayzin…
Browse files Browse the repository at this point in the history
…g-override

Add override for code scanning analysis of default branch
  • Loading branch information
charisk authored Mar 23, 2023
2 parents 04f256d + 94cc1de commit 0214d1d
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 0214d1d

Please sign in to comment.