Use multi-line script to resolve app user id without nested quotes

Store the gh api result in a variable and move app-slug into an env var, addressing PR review feedback about nested double-quotes in the run step.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
vivekkr0311
2026-08-17 11:43:21 +05:30
co-authored by Copilot
parent 9858846aae
commit 23f7c75198
+4 -1
View File
@@ -51,7 +51,10 @@ jobs:
if: steps.check.outputs.changed == 'true'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
run: |
user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)"
echo "user-id=${user_id}" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
if: steps.check.outputs.changed == 'true'