Use the fully qualified ref name

This commit is contained in:
Robin Neatherway 2021-01-13 12:16:10 +00:00
parent 884ee1d129
commit 369cad8272
6 changed files with 6 additions and 6 deletions

View file

@ -73,7 +73,7 @@ test("validate correct payload used per version", async (t) => {
version,
"actions"
);
t.deepEqual(payload.base_ref, "master");
t.deepEqual(payload.base_ref, "refs/heads/master");
t.deepEqual(payload.base_sha, "f95f852bd8fca8fcc58a9a2d6c842781e32a215e");
}

View file

@ -258,7 +258,7 @@ export function buildPayload(
const githubEvent = JSON.parse(
fs.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8")
);
payloadObj.base_ref = githubEvent.pull_request.base.ref;
payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`;
payloadObj.base_sha = githubEvent.pull_request.base.sha;
}
}