From 9df5213b4923372daeb7a6f1fa4613ed6ceb2b48 Mon Sep 17 00:00:00 2001 From: Altay Date: Mon, 3 Aug 2026 22:23:08 +0300 Subject: [PATCH 1/2] ci(release): resolve releaser bot user id at runtime Avoid hardcoding the bot numeric id so noreply commit emails stay linked if the App is recreated. --- .github/workflows/ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2919bf2..1314f7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,20 @@ jobs: permission-issues: write permission-pull-requests: write + - name: Resolve release bot identity + id: release-bot-identity + env: + GH_TOKEN: ${{ steps.release-bot.outputs.token }} + APP_SLUG: ${{ steps.release-bot.outputs.app-slug }} + run: | + set -euo pipefail + user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)" + if [[ ! "$user_id" =~ ^[0-9]+$ ]]; then + echo "failed to resolve numeric bot user id for ${APP_SLUG}[bot]" >&2 + exit 1 + fi + echo "user-id=${user_id}" >> "$GITHUB_OUTPUT" + - name: Check out repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: @@ -104,6 +118,6 @@ jobs: GITHUB_TOKEN: ${{ steps.release-bot.outputs.token }} NPM_CONFIG_PROVENANCE: "true" GIT_AUTHOR_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot] - GIT_AUTHOR_EMAIL: 283001373+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com + GIT_AUTHOR_EMAIL: ${{ steps.release-bot-identity.outputs.user-id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com GIT_COMMITTER_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot] - GIT_COMMITTER_EMAIL: 283001373+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com + GIT_COMMITTER_EMAIL: ${{ steps.release-bot-identity.outputs.user-id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com From 1fefa202d57bb080ea7ef6b8b58899ea122ede83 Mon Sep 17 00:00:00 2001 From: Altay Date: Mon, 3 Aug 2026 22:30:59 +0300 Subject: [PATCH 2/2] ci(release): harden runtime bot identity lookup Use an explicit bash shell, URL-encode the [bot] path segment, and emit user_id so Actions expressions do not treat the output name as subtraction. --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1314f7e..bafa534 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,17 +69,18 @@ jobs: - name: Resolve release bot identity id: release-bot-identity + shell: bash env: GH_TOKEN: ${{ steps.release-bot.outputs.token }} APP_SLUG: ${{ steps.release-bot.outputs.app-slug }} run: | set -euo pipefail - user_id="$(gh api "/users/${APP_SLUG}[bot]" --jq .id)" + user_id="$(gh api "/users/${APP_SLUG}%5Bbot%5D" --jq .id)" if [[ ! "$user_id" =~ ^[0-9]+$ ]]; then echo "failed to resolve numeric bot user id for ${APP_SLUG}[bot]" >&2 exit 1 fi - echo "user-id=${user_id}" >> "$GITHUB_OUTPUT" + echo "user_id=${user_id}" >> "$GITHUB_OUTPUT" - name: Check out repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -118,6 +119,6 @@ jobs: GITHUB_TOKEN: ${{ steps.release-bot.outputs.token }} NPM_CONFIG_PROVENANCE: "true" GIT_AUTHOR_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot] - GIT_AUTHOR_EMAIL: ${{ steps.release-bot-identity.outputs.user-id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com + GIT_AUTHOR_EMAIL: ${{ steps.release-bot-identity.outputs.user_id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com GIT_COMMITTER_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot] - GIT_COMMITTER_EMAIL: ${{ steps.release-bot-identity.outputs.user-id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com + GIT_COMMITTER_EMAIL: ${{ steps.release-bot-identity.outputs.user_id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com