mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: handle issue_comment event (#8726)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user