Skip to content

chore: fast-forward merge workflow#581

Open
agentbridge-fixer[bot] wants to merge 1 commit into
masterfrom
chore/ff-merge-workflow
Open

chore: fast-forward merge workflow#581
agentbridge-fixer[bot] wants to merge 1 commit into
masterfrom
chore/ff-merge-workflow

Conversation

@agentbridge-fixer

Copy link
Copy Markdown

What

Adds a workflow_dispatch GitHub Actions workflow that fast-forward merges a PR by directly advancing the base branch ref via the GitHub REST API (no merge commit, no squash — pure FF).

Usage (once merged)

Actions → Fast-Forward Merge → Run workflow → enter PR number

Or from the CLI:

gh workflow run ff-merge.yml -f pr_number=580

The workflow:

  1. Fetches the PR metadata (fails if PR is not open)
  2. Calls /compare/{base}...{head} — fails with a clear message if the branch is behind master (needs rebase first)
  3. PATCHes the base ref to the PR head SHA — GitHub detects the PR commits in master and closes the PR as merged ✅

Blocking other merge methods (apply after merging this PR)

⚠️ Bootstrap note: This PR must be merged one last time using the current Rebase and Merge button. Once the workflow is in master, run the command below to remove the merge button entirely.

gh api --method PATCH /repos/catatafishen/agentbridge   -F allow_merge_commit=false   -F allow_squash_merge=false   -F allow_rebase_merge=false

This removes GitHub's Merge/Squash/Rebase buttons from all future PRs, making the Actions workflow the only merge path.

@agentbridge-fixer
agentbridge-fixer Bot requested a review from catatafishen as a code owner May 10, 2026 21:06
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
Comment thread .github/workflows/ff-merge.yml Fixed
@catatafishen
catatafishen force-pushed the chore/ff-merge-workflow branch from 8da82ce to 9e2d484 Compare May 12, 2026 08:51
Adds a workflow_dispatch workflow that fast-forward merges a PR by
directly advancing the base branch ref via the GitHub REST API —
no merge commit, no squash, pure FF with original hashes preserved.

If the branch is behind master the workflow fails immediately with
the exact rebase command to run locally (preserving commit hashes
and any commit signatures).

Usage: Actions → Fast-Forward Merge → Run workflow → enter PR number.

After merging this PR, disable the other merge methods so FF merge
becomes the only way to merge:

  gh api --method PATCH /repos/catatafishen/agentbridge \
    -F allow_merge_commit=false \
    -F allow_squash_merge=false \
    -F allow_rebase_merge=false

All ${{ github.* }} and ${{ inputs.* }} template expressions that
appeared inline in run: shell blocks are now exposed via env: variables
to prevent code injection via template expansion (zizmor).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@catatafishen
catatafishen force-pushed the chore/ff-merge-workflow branch from 9e2d484 to 86904e3 Compare May 25, 2026 09:10
@sonarqubecloud

Copy link
Copy Markdown

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