Skip to content

Commit

Permalink
Is it doing string comparison not boolean evaluation?
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Mar 27, 2024
1 parent 98a570f commit e0b6a05
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/fetch_sha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
with:
result-encoding: string
script: |
if (!${{ needs.check-if-pr-comment.outputs.is-pr-comment }}) {
return context.sha;
if (${{ needs.check-if-pr-comment.outputs.is-pr-comment }} == "true") {
const { data: pr } = await github.rest.pulls.get({
owner: context.issue.owner,
repo: context.issue.repo,
pull_number: context.issue.number,
});
return pr.head.sha;
};
const { data: pr } = await github.rest.pulls.get({
owner: context.issue.owner,
repo: context.issue.repo,
pull_number: context.issue.number,
});
return pr.head.sha;
return context.sha;
report-sha:
name: Report SHA that was recovered
Expand Down

0 comments on commit e0b6a05

Please sign in to comment.