Rewrite the ref to correctly point to refs/remotes
Fixes the rev-parse issues caused by https://github.com/github/codeql-action/pull/428
This commit is contained in:
parent
972dc3e3f9
commit
ba14abbca7
6 changed files with 11 additions and 6 deletions
2
lib/actions-util.test.js
generated
2
lib/actions-util.test.js
generated
|
|
@ -40,7 +40,7 @@ ava_1.default("getRef() returns merge PR ref if GITHUB_REF still checked out but
|
|||
process.env["GITHUB_SHA"] = "b".repeat(40);
|
||||
const sha = "a".repeat(40);
|
||||
const callback = sinon_1.default.stub(actionsutil, "getCommitOid");
|
||||
callback.withArgs("refs/pull/1/merge").resolves(sha);
|
||||
callback.withArgs("refs/remotes/pull/1/merge").resolves(sha);
|
||||
callback.withArgs("HEAD").resolves(sha);
|
||||
const actualRef = await actionsutil.getRef();
|
||||
t.deepEqual(actualRef, expectedRef);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue