ops(fix): passa GITHUB_TOKEN aos workflows de flip na main-merge (GH_TOKEN não era lido pelos scripts)

github-api.mjs lê GITHUB_TOKEN (não GH_TOKEN); os dois workflows de flip
pós-merge (issue-done e plan-issue-ready) só definiam GH_TOKEN, então o
script falhava em autenticar ('Sem token ... defina GITHUB_TOKEN') e o
flip/promoção silenciava: o job saía success mas a Issue ficava presa
(PR #818 / #817 e PR #820 / #813). Alinha com agent-pr-ready-automerge.yml
que já passava GITHUB_TOKEN explicitamente.
This commit is contained in:
Francisco Solla 2026-08-23 21:27:59 -03:00
parent 1d762755d9
commit ab420f9b7d
2 changed files with 12 additions and 4 deletions

View file

@ -36,8 +36,12 @@ jobs:
(github.event_name == 'workflow_dispatch' && inputs.pr != '')
runs-on: ubuntu-latest
env:
# The github-api.mjs client reads GITHUB_TOKEN; the built-in token has
# `issues: write` scoped to this repo (the issue tracker is on GitHub).
# The github-api.mjs client reads GITHUB_TOKEN (not GH_TOKEN); the built-in
# token has `issues: write` scoped to this repo (the issue tracker is on
# GitHub). Explicit `github.token` — the built-in GITHUB_TOKEN env is not
# guaranteed on every event path; passing it via the documented context is
# the robust form (same as agent-pr-ready-automerge.yml).
GITHUB_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v5

View file

@ -43,8 +43,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
# The github-api.mjs client reads GITHUB_TOKEN; the built-in token has
# `issues: write` scoped to this repo (the tracker is on GitHub).
# The github-api.mjs client reads GITHUB_TOKEN (not GH_TOKEN); the built-in
# token has `issues: write` scoped to this repo (the tracker is on GitHub).
# Explicit `github.token` — the built-in GITHUB_TOKEN env is not guaranteed
# on every event path; passing it via the documented context is the robust form
# (same as agent-pr-ready-automerge.yml).
GITHUB_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v5