mudlet/.github
Vadim Peretokin c2d3561c0b
infrastructure: assign milestones with the built-in token, not a PAT (#9696)
#### Brief overview of PR changes/additions

- The add-milestone check now fails on every PR: the Mudlet org forbids
fine-grained PATs with a lifetime over 366 days, so every API call made
with `GH_PAT_UPDATE_PULL_REQUESTS` returns HTTP 403. The old workflow
swallowed this with unchecked `curl -s`; the strict error handling from
#9679 (infrastructure: fix milestone assignment, unbreak the key
sequence tests) surfaced it - first failure 25 minutes after that merge.
- Switches the "Assign PR to milestone" step to the built-in
`GITHUB_TOKEN`, which already works in this workflow (the
milestone-resolving step uses it and succeeded in the failing runs).
`pull_request_target` runs in the base repository, so it has write
access with `issues: write` / `pull-requests: write` granted.
- Removes the dependency on the `GH_PAT_UPDATE_PULL_REQUESTS` secret
entirely, so no PAT needs re-minting and no future expiry can break this
again.

Note: because this runs on `pull_request_target`, the default-branch
copy of the workflow executes - the fix only takes effect after merge,
so the add-milestone check on this PR itself will still fail.

#### Test case

The failing run's own log shows `GITHUB_TOKEN` succeeding at the
milestone-read step while the PAT step 403s, confirming the built-in
token works where the PAT does not.

Assisted-by: Claude:claude-fable-5
2026-08-06 08:14:12 +02:00
..
codeql Infrastructure: disable CodeQL poorly-documented-function query (#9079) 2026-03-22 12:07:26 +01:00
ISSUE_TEMPLATE Infrastructure: New default labels and type for Github issues (#8456) 2025-10-27 18:03:46 +01:00
scripts infrastructure: fix milestone assignment, unbreak the key sequence tests (#9679) 2026-08-06 06:07:10 +02:00
skills/open-pr Infrastructure: Add Copilot skill for opening pull requests (#9105) 2026-03-24 12:28:15 +01:00
workflows infrastructure: assign milestones with the built-in token, not a PAT (#9696) 2026-08-06 08:14:12 +02:00
CODEOWNERS Infrastructure: update CODEOWNERS for the 1 team we have now (#7366) 2024-07-28 19:49:00 +02:00
codespell-wordlist.txt Infrastructure: Add 'nd' as an allowed word (#5616) 2021-11-09 11:07:07 +01:00
copilot-instructions.md Infrastructure: update info for LLM agents (#8245) 2025-09-23 07:06:06 +02:00
dependabot.yml Infrastructure: Ignore lcf submodule in Dependabot, remove vcpkg (#8654) 2025-12-19 18:28:09 +01:00
pr-labeler.yml Improve translation updates (#2712) 2019-07-04 16:58:49 +02:00
PULL_REQUEST_TEMPLATE.md Infrastructure: remove 'release post highlight' from pull request template (#5959) 2022-02-07 09:46:05 +01:00
repo-metadata.yml infrastructure: fix milestone assignment, unbreak the key sequence tests (#9679) 2026-08-06 06:07:10 +02:00