fix: handle issue_comment event (#8726)

This commit is contained in:
Muhammad Atif Ali
2023-07-25 19:52:44 +00:00
committed by GitHub
parent 67f1123808
commit 844ef76d39
+4 -1
View File
@@ -39,7 +39,10 @@ jobs:
id: pr_number
run: |
set -euxo pipefail
PR_NUMBER=$(gh pr view ${{ github.event.inputs.pr_number }} --json number | jq -r '.number')
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
PR_NUMBER=${{ github.event.inputs.pr_number }}"
else
PR_NUMBER=${{ github.event.issue.number }}"
PR_TITLE=$(gh pr view $PR_NUMBER --json title | jq -r '.title')
PR_BRANCH=$(gh pr view $PR_NUMBER --json headRefName | jq -r '.headRefName')
echo "PR_URL=https://github.com/coder/coder/pull/$PR_NUMBER" >> $GITHUB_OUTPUT