From 8961c46868afec473f313ea13c17181c52295902 Mon Sep 17 00:00:00 2001 From: Altay Date: Mon, 3 Aug 2026 22:19:59 +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 2639e84..3d77618 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -100,6 +114,6 @@ jobs: env: GITHUB_TOKEN: ${{ steps.release-bot.outputs.token }} 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 9f1bc224bf2739d363e0677b10a852da23fc5de0 Mon Sep 17 00:00:00 2001 From: Altay Date: Mon, 3 Aug 2026 22:29:20 +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 3d77618..34a7489 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -114,6 +115,6 @@ jobs: env: GITHUB_TOKEN: ${{ steps.release-bot.outputs.token }} 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