Skip to content

ci: allow backport workflow to use a PAT to trigger downstream CI#853

Merged
mcottontensor merged 1 commit intoEpicGamesExt:masterfrom
mcottontensor:fix/655-backport-actions-pat
May 1, 2026
Merged

ci: allow backport workflow to use a PAT to trigger downstream CI#853
mcottontensor merged 1 commit intoEpicGamesExt:masterfrom
mcottontensor:fix/655-backport-actions-pat

Conversation

@mcottontensor
Copy link
Copy Markdown
Collaborator

@mcottontensor mcottontensor commented Apr 30, 2026

Summary

  • Read github_token from secrets.BACKPORT_PAT || secrets.GITHUB_TOKEN in .github/workflows/backport.yml.
  • Behaviour is unchanged when BACKPORT_PAT is not set.
  • Once a repo or org secret named BACKPORT_PAT is configured (a PAT with repo scope), backport PRs will trigger downstream pull_request workflows like the rest of CI.

GitHub deliberately doesn't fire pull_request events for PRs opened with the default GITHUB_TOKEN (anti-recursion safeguard), which is why backport PRs land without CI running on them.

Test plan

  • Repo admin adds a BACKPORT_PAT secret (PAT with repo scope).
  • Trigger a backport on a test PR; verify the resulting backport PR runs the usual CI workflows.
  • No-secret fallback: workflow still resolves to GITHUB_TOKEN, so behaviour is unchanged for forks / contributors who haven't configured the secret.

Closes #655.

…icGamesExt#655)

PRs opened with the default GITHUB_TOKEN do not trigger downstream
pull_request workflows (an anti-recursion safeguard), which is why
backport PRs land without CI running on them. Read the github_token
from BACKPORT_PAT first and fall back to GITHUB_TOKEN, so configuring
a repo/org secret named BACKPORT_PAT (PAT with repo scope) unlocks
CI on backport PRs without any further code change. Behavior is
unchanged when the secret is not configured.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

⚠️ No Changeset found

Latest commit: 6dc998f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@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 May 1, 2026
@mcottontensor mcottontensor merged commit 9d9db1d into EpicGamesExt:master May 1, 2026
8 checks passed
@mcottontensor
Copy link
Copy Markdown
Collaborator Author

💔 All backports failed

Status Branch Result
UE5.5 An unhandled error occurred. Please see the logs for details
UE5.6 An unhandled error occurred. Please see the logs for details
UE5.7 An unhandled error occurred. Please see the logs for details

Manual backport

To create the backport manually run:

backport --pr 853

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 and see the Github Action logs for details

@mcottontensor mcottontensor deleted the fix/655-backport-actions-pat branch May 1, 2026 00:42
mcottontensor added a commit that referenced this pull request May 1, 2026
…) (#853) (#855)

PRs opened with the default GITHUB_TOKEN do not trigger downstream
pull_request workflows (an anti-recursion safeguard), which is why
backport PRs land without CI running on them. Read the github_token
from BACKPORT_PAT first and fall back to GITHUB_TOKEN, so configuring
a repo/org secret named BACKPORT_PAT (PAT with repo scope) unlocks
CI on backport PRs without any further code change. Behavior is
unchanged when the secret is not configured.

(cherry picked from commit 9d9db1d)
mcottontensor added a commit that referenced this pull request May 1, 2026
…) (#853) (#856)

PRs opened with the default GITHUB_TOKEN do not trigger downstream
pull_request workflows (an anti-recursion safeguard), which is why
backport PRs land without CI running on them. Read the github_token
from BACKPORT_PAT first and fall back to GITHUB_TOKEN, so configuring
a repo/org secret named BACKPORT_PAT (PAT with repo scope) unlocks
CI on backport PRs without any further code change. Behavior is
unchanged when the secret is not configured.

(cherry picked from commit 9d9db1d)
mcottontensor added a commit that referenced this pull request May 1, 2026
…) (#853) (#857)

PRs opened with the default GITHUB_TOKEN do not trigger downstream
pull_request workflows (an anti-recursion safeguard), which is why
backport PRs land without CI running on them. Read the github_token
from BACKPORT_PAT first and fall back to GITHUB_TOKEN, so configuring
a repo/org secret named BACKPORT_PAT (PAT with repo scope) unlocks
CI on backport PRs without any further code change. Behavior is
unchanged when the secret is not configured.

(cherry picked from commit 9d9db1d)
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Repo] Backport actions are not triggering workflow actions.

1 participant