mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
use gh cli (#8725)
This commit is contained in:
@@ -39,18 +39,15 @@ jobs:
|
||||
id: pr_number
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
if [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
|
||||
PR_NUMBER=${{ github.event.inputs.pr_number }}
|
||||
PR_TITLE=$(gh pr view $PR_NUMBER --json title | jq -r '.title')
|
||||
else
|
||||
PR_NUMBER=${{ github.event.issue.number }}
|
||||
PR_TITLE='${{ github.event.issue.title }}'
|
||||
fi
|
||||
PR_NUMBER=$(gh pr view ${{ github.event.inputs.pr_number }} --json number | jq -r '.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
|
||||
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT
|
||||
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_OUTPUT
|
||||
echo "PR_BRANCH=$PR_BRANCH" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set required tags
|
||||
id: set_tags
|
||||
|
||||
Reference in New Issue
Block a user