Skip to content

ci: use AUTOMATION_PAT for workflows that open PRs#914

Merged
mcottontensor merged 1 commit into
EpicGames:masterfrom
mcottontensor:ci/use-automation-pat-for-pr-workflows
Jun 21, 2026
Merged

ci: use AUTOMATION_PAT for workflows that open PRs#914
mcottontensor merged 1 commit into
EpicGames:masterfrom
mcottontensor:ci/use-automation-pat-for-pr-workflows

Conversation

@mcottontensor

Copy link
Copy Markdown
Collaborator

Summary

The org-level policy "Allow GitHub Actions to create and approve pull requests" is disabled, so the default GITHUB_TOKEN cannot open PRs. This is what broke the Prune Master Changesets job, which failed with:

GitHub Actions is not permitted to create or approve pull requests.

This points the three workflows that open PRs at a single repo/org secret, AUTOMATION_PAT (a PAT with repo + workflow scope), instead of GITHUB_TOKEN:

  • changesets-prune-master.yml — the job that actually failed (peter-evans/create-pull-request)
  • changesets-update-changelogs.yml — the release PR (changesets/action); same policy, would fail on the next release
  • backport.yml — replaces the previous BACKPORT_PAT with the unified AUTOMATION_PAT

Why drop the GITHUB_TOKEN fallbacks?

Under this org policy the fallback can only ever fail, and it produces the misleading "not permitted to create or approve pull requests" error. Referencing AUTOMATION_PAT directly means a missing/expired secret fails loudly and clearly instead.

healthcheck-markdown-links.yml is intentionally left unchanged — it creates issues, which GITHUB_TOKEN is still permitted to do.

Notes

  • Requires the AUTOMATION_PAT secret on the EpicGames repo/org (already added), with repo + workflow scope and SSO-authorized for the org.
  • The old BACKPORT_PAT secret is now unused and can be removed.

The org-level policy "Allow GitHub Actions to create and approve pull
requests" is disabled, so the default GITHUB_TOKEN cannot open PRs --
this is what broke the changesets prune job. Point the prune, changelog
release, and backport workflows at a single AUTOMATION_PAT (repo +
workflow scope) instead, replacing the now-removed BACKPORT_PAT.

Dropped the GITHUB_TOKEN fallbacks: under this policy they can only
fail, and a missing-secret error is clearer than the misleading
"not permitted to create or approve pull requests" message.
@mcottontensor mcottontensor added auto-backport Used to specify we want a PR to auto backport to a branch, must be paired with auto-backport-to-UEX. auto-backport-to-UE5.5 auto-backport-to-UE5.6 auto-backport-to-UE5.7 labels Jun 21, 2026
@mcottontensor mcottontensor merged commit 49a4163 into EpicGames:master Jun 21, 2026
4 checks passed
@mcottontensor mcottontensor deleted the ci/use-automation-pat-for-pr-workflows branch June 21, 2026 23:38
@mcottontensor

Copy link
Copy Markdown
Collaborator Author

💔 All backports failed

Status Branch Result
UE5.5 Backport failed because of merge conflicts

You might need to backport the following PRs to UE5.5:
- fix(deps): resolve dependabot security alerts (#905)
- chore: update org references from EpicGamesExt to EpicGames (#901)
- Add guard against closed peerConnection (#788)
- fixing public ip stomping in windows batch script. (#780)
UE5.6 Backport failed because of merge conflicts

You might need to backport the following PRs to UE5.6:
- fix(deps): resolve dependabot security alerts (#905)
- chore: update org references from EpicGamesExt to EpicGames (#901)
- Add guard against closed peerConnection (#788)
UE5.7 Backport failed because of merge conflicts

You might need to backport the following PRs to UE5.7:
- Add guard against closed peerConnection (#788)

Manual backport

To create the backport manually run:

backport --pr 914

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@mcottontensor

Copy link
Copy Markdown
Collaborator Author

💚 All backports created successfully

Status Branch Result
UE5.5
UE5.6
UE5.7

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

mcottontensor added a commit that referenced this pull request Jun 21, 2026
The org-level policy "Allow GitHub Actions to create and approve pull
requests" is disabled, so the default GITHUB_TOKEN cannot open PRs --
this is what broke the changesets prune job. Point the prune, changelog
release, and backport workflows at a single AUTOMATION_PAT (repo +
workflow scope) instead, replacing the now-removed BACKPORT_PAT.

Dropped the GITHUB_TOKEN fallbacks: under this policy they can only
fail, and a missing-secret error is clearer than the misleading
"not permitted to create or approve pull requests" message.

(cherry picked from commit 49a4163)

# Conflicts:
#	.github/workflows/changesets-prune-master.yml
mcottontensor added a commit that referenced this pull request Jun 21, 2026
The org-level policy "Allow GitHub Actions to create and approve pull
requests" is disabled, so the default GITHUB_TOKEN cannot open PRs --
this is what broke the changesets prune job. Point the prune, changelog
release, and backport workflows at a single AUTOMATION_PAT (repo +
workflow scope) instead, replacing the now-removed BACKPORT_PAT.

Dropped the GITHUB_TOKEN fallbacks: under this policy they can only
fail, and a missing-secret error is clearer than the misleading
"not permitted to create or approve pull requests" message.

(cherry picked from commit 49a4163)

# Conflicts:
#	.github/workflows/changesets-prune-master.yml
mcottontensor added a commit that referenced this pull request Jun 21, 2026
The org-level policy "Allow GitHub Actions to create and approve pull
requests" is disabled, so the default GITHUB_TOKEN cannot open PRs --
this is what broke the changesets prune job. Point the prune, changelog
release, and backport workflows at a single AUTOMATION_PAT (repo +
workflow scope) instead, replacing the now-removed BACKPORT_PAT.

Dropped the GITHUB_TOKEN fallbacks: under this policy they can only
fail, and a missing-secret error is clearer than the misleading
"not permitted to create or approve pull requests" message.

(cherry picked from commit 49a4163)

# Conflicts:
#	.github/workflows/changesets-prune-master.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Used to specify we want a PR to auto backport to a branch, must be paired with auto-backport-to-UEX. auto-backport-to-UE5.5 auto-backport-to-UE5.6 auto-backport-to-UE5.7

Development

Successfully merging this pull request may close these issues.

1 participant