Skip to content

Commit

Permalink
adding ref != null check in update status
Browse files Browse the repository at this point in the history
  • Loading branch information
mchinta7 committed Jan 19, 2024
1 parent 1ef0884 commit a468c6e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/pr-validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@ jobs:
if (context.eventName == 'schedule') {
ref = context.sha;
}
const { data: result } = await github.rest.checks.create({
...context.repo,
name: process.env.validate_job_name,
head_sha: ref,
status: 'completed',
conclusion: process.env.conclusion,
details_url: url,
});
console.log('created check')
return result;
if (ref != null) {
const { data: result } = await github.rest.checks.create({
...context.repo,
name: process.env.validate_job_name,
head_sha: ref,
status: 'completed',
conclusion: process.env.conclusion,
details_url: url,
});
console.log('created check')
return result;
}

0 comments on commit a468c6e

Please sign in to comment.