diff --git a/.github/workflows/comment-cfg-grammar-changes.yml b/.github/workflows/comment-cfg-grammar-changes.yml index 6e4bbe3ce..2ac603755 100644 --- a/.github/workflows/comment-cfg-grammar-changes.yml +++ b/.github/workflows/comment-cfg-grammar-changes.yml @@ -48,7 +48,11 @@ jobs: # There is also no json field in the `gh run view` command, which could give us the PR ID, so we can only query it based on the fork and branch. # See https://github.com/orgs/community/discussions/25220 - PR_ID=$(gh pr view -R "${{ github.repository }}" "${{ github.event.workflow_run.head_repository.owner.login }}:${{ github.event.workflow_run.head_branch }}" --json "number" --jq ".number") + OWNER="${{ github.event.workflow_run.head_repository.owner.login }}" + if [[ "${OWNER}" == "axoflow" ]]; then + PR_ID=$(gh pr view -R "${{ github.repository }}" "${{ github.event.workflow_run.head_branch }}" --json "number" --jq ".number") + else + PR_ID=$(gh pr view -R "${{ github.repository }}" "${OWNER}":"${{ github.event.workflow_run.head_branch }}" --json "number" --jq ".number") echo "pr-id=${PR_ID}" >> $GITHUB_OUTPUT - name: Update or remove PR comment