Skip to content

Commit

Permalink
fix: handle successful run without an open issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Mar 25, 2024
1 parent a38348f commit 4290150
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/schedule.sgid-index-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
state: 'open',
labels: 'sgid index validation'
});
const issueNumber = issues[0].number;
const issueNumber = issues[0]?.number;
console.log('issueNumber: ' + issueNumber);
return issueNumber;
Expand All @@ -88,13 +88,15 @@ jobs:

- name: Find Comment
uses: peter-evans/find-comment@v3
if: steps.create-issue.outputs.number || steps.find-issue.outputs.result
id: find-comment
with:
issue-number: ${{ steps.create-issue.outputs.number || steps.find-issue.outputs.result }}
comment-author: github-actions[bot]
body-includes: Validation Output

- name: ✍️ Updating issue comment
if: steps.create-issue.outputs.number || steps.find-issue.outputs.result
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ steps.create-issue.outputs.number || steps.find-issue.outputs.result }}
Expand Down

0 comments on commit 4290150

Please sign in to comment.