Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workflow dispatch #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fallback to git ref commit
npm run package
  • Loading branch information
gitfool committed Dec 8, 2021
commit 874899f4c13228fc60953ce44bfad538980423ad
6 changes: 6 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18478,6 +18478,12 @@ async function pullRequestInfo(payload = {}) {
commit = pullRequest.head.sha;
} else if (payload.after) {
commit = payload.after;
} else if (payload.ref) {
const { data } = await client.rest.git.getRef({
ref: payload.ref.slice("refs/".length),
...github.context.repo,
});
commit = data.object.sha;
}

return { pullRequestNumber, commit };
Expand Down
6 changes: 6 additions & 0 deletions src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ async function pullRequestInfo(payload = {}) {
commit = pullRequest.head.sha;
} else if (payload.after) {
commit = payload.after;
} else if (payload.ref) {
const { data } = await client.rest.git.getRef({
ref: payload.ref.slice("refs/".length),
...github.context.repo,
});
commit = data.object.sha;
}

return { pullRequestNumber, commit };
Expand Down