Skip to content

Replace PHPSTAN_BOT_TOKEN with scoped tokens - #7248

Merged
ondrejmirtes merged 2 commits into
2.3.xfrom
bot-tokens
Nov 30, 2026
Merged

ondrejmirtes merged 2 commits into
2.3.xfrom
bot-tokens

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

PHPSTAN_BOT_TOKEN is revoked. Everything visible still acts as phpstan-bot through its fine-grained tokens; only pushes to protected branches move to the phpstan-push App, which replaces the bots team on the Protect all branches ruleset.

Secret / source Used by
PHPSTAN_BOT_ISSUES_TOKEN (org secret) close-issues-on-merge, pr-base-on-previous-branch, pr-marked-as-ready, issue-bot
PHPSTAN_BOT_CONTENTS_TOKEN (org secret) apiref and test-projects dispatches, phar.yml turbo-ext PIE release
PHPSTAN_BOT_PULL_REQUESTS_TOKEN (bot-pr environment) merge-bot-pr (now pull_request_target, no checkout), update-phpstorm-stubs
PHPSTAN_BOT_FORK_DISPATCH_TOKEN (org secret) the four Claude dispatch workflows
phpstan-push App, PUSH_APP_CLIENT_ID / PUSH_APP_PRIVATE_KEY (push environment) phar.yml commit job, subsplit-turbo-ext, merge-maintained-branch

Environments (deployment: false, no reviewer):

  • push: branches 2.*.x, tags 2.*.*. Also move GPG_PHPSTANBOT_PRIVATE_KEY / GPG_PHPSTANBOT_KEY_PASSPHRASE here.
  • bot-pr: branches 2.*.x.

Merge after the App, environments and secrets exist, the bots team is off the ruleset, and phpstan-bot has Write here and on phpstan/phpstan.

- comments and closing issues: PHPSTAN_BOT_ISSUES_TOKEN
- repository_dispatch and the turbo-ext release: PHPSTAN_BOT_CONTENTS_TOKEN
- opening and merging bot PRs: PHPSTAN_BOT_PULL_REQUESTS_TOKEN from the
  bot-pr environment; merge-bot-pr.yml runs on pull_request_target so the
  base branch can deploy to it
- Claude dispatches into the phpstan-bot fork: PHPSTAN_BOT_FORK_DISPATCH_TOKEN
- pushes to protected branches (phar.yml dist commit, subsplit,
  merge-maintained-branch): a phpstan-push App token minted from the push
  environment; commits stay authored and signed by phpstan-bot

Amp-Thread-ID: https://ampcode.com/threads/T-01a22152-db15-752f-a0d3-582d55ae32cb
@ondrejmirtes
ondrejmirtes merged commit e0f91db into 2.3.x Nov 30, 2026
873 of 904 checks passed
@ondrejmirtes
ondrejmirtes deleted the bot-tokens branch November 30, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant