Conversation
|
/fast-forward |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e435987d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| jobs: | ||
| fast-forward: | ||
| if: ${{ (contains(github.event.comment.body, '/fast-forward') |
There was a problem hiding this comment.
Parse slash command as an exact trigger
Using contains(github.event.comment.body, '/fast-forward') causes the merge job to run whenever that substring appears anywhere in a maintainer comment, so a message like please don't /fast-forward yet still executes the merge path. Because this workflow has write permissions, accidental mentions can mutate PR state unexpectedly; the condition should match an explicit command token rather than a substring.
Useful? React with 👍 / 👎.
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ fromJSON(steps.get_pull_request_ref.outputs.data).head.ref }} |
There was a problem hiding this comment.
Checkout the PR head repository before rebasing
The rebase flow checks out only head.ref but does not set repository, so actions/checkout targets github.repository (the base repo). For fork-based PRs, that branch exists only in the fork, so this step fails (or can resolve to an unrelated same-named branch in the base repo), preventing /rebase from working reliably for external contributions.
Useful? React with 👍 / 👎.
Summary
/fast-forward(and/ffalias) comment-triggered fast-forward merges/rebasecommand for rebasing PR branches on the default branchmainormasterContext
This workflow enables maintainers to merge PRs via fast-forward by commenting
/fast-forwardor/ffon a PR. It also supports/rebaseto rebase a PR branch on the default branch.Requires the
GH_PUSH_TOKENorg-level secret (already configured).