Skip to content

Commit 6256f50

Browse files
can override default commit sha
1 parent dcde219 commit 6256f50

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2186,7 +2186,8 @@ function run() {
21862186
var _a, _b;
21872187
return __awaiter(this, void 0, void 0, function* () {
21882188
try {
2189-
const pull = yield getMergedPullRequest(core.getInput('github_token'), github.context.repo.owner, github.context.repo.repo, github.context.sha);
2189+
const commitSha = core.getInput('commit_sha') || github.context.sha;
2190+
const pull = yield getMergedPullRequest(core.getInput('github_token'), github.context.repo.owner, github.context.repo.repo, commitSha);
21902191
if (!pull) {
21912192
core.debug('pull request not found');
21922193
return;

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ interface PullRequest {
1313

1414
async function run(): Promise<void> {
1515
try {
16+
const commitSha = core.getInput('commit_sha') || github.context.sha;
17+
1618
const pull = await getMergedPullRequest(
1719
core.getInput('github_token'),
1820
github.context.repo.owner,
1921
github.context.repo.repo,
20-
github.context.sha
22+
commitSha
2123
);
2224

2325
if (!pull) {

0 commit comments

Comments
 (0)