Skip to content

Commit

Permalink
setting ref for PR after github GET pull request call
Browse files Browse the repository at this point in the history
  • Loading branch information
mchinta7 committed Jan 19, 2024
1 parent a468c6e commit 9af692e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr-validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
var ref;
const url = `${process.env.server_url}/${process.env.repo}/actions/runs/${process.env.run_id}`
if (context.eventName == 'pull_request') {
ref = pull.head.sha;
const { data: pull } = await github.rest.pulls.get({
...context.repo,
pull_number: process.env.number
});
console.log('retrieved pull request')
ref = pull.head.sha;
}
if (context.eventName == 'schedule') {
Expand Down

0 comments on commit 9af692e

Please sign in to comment.