Skip to content

docs(rebase-pr): add repository prerequisites and ruleset architecture guide#66

Merged
JacobPEvans merged 4 commits intomainfrom
feat/rebase-pr-docs
Mar 2, 2026
Merged

docs(rebase-pr): add repository prerequisites and ruleset architecture guide#66
JacobPEvans merged 4 commits intomainfrom
feat/rebase-pr-docs

Conversation

@JacobPEvans
Copy link
Owner

@JacobPEvans JacobPEvans commented Mar 2, 2026

Summary

  • Bumps version to 1.2.0
  • Expands "Why This Workflow?" with GitHub error details and the key insight about push+auto-close
  • Adds "Repository Prerequisites" section covering local git config and required ruleset architecture
  • Documents how the pull_request rule works with local rebase (commits auto-associated with open PR)
  • Updates Phase 4 and Phase 6 with cross-references to prerequisites
  • Adds two new edge cases: force-push blocked and ruleset misconfiguration
  • Adds two new anti-pattern table rows for all-branches ruleset mistakes

Background

Discovered during a real failure on secrets-sync PR #8: the all-branches ruleset had non_fast_forward and required_linear_history, which blocked force-push of the rebased feature branch. The fix was scoping those rules to main-only.

🤖 Generated with Claude Code


Important

Updates SKILL.md with repository prerequisites, ruleset architecture guide, and additional edge cases for rebase-merge workflow.

  • Documentation Updates:
    • Adds "Repository Prerequisites" section in SKILL.md detailing local git config and ruleset architecture.
    • Expands "Why This Workflow?" with GitHub error details and key insights about push+auto-close.
    • Updates Phase 4 and Phase 6 with cross-references to prerequisites.
    • Documents how the pull_request rule works with local rebase.
  • Edge Cases and Anti-Patterns:
    • Adds edge cases for force-push blocked and ruleset misconfiguration.
    • Adds anti-patterns for all-branches ruleset mistakes.
  • Miscellaneous:
    • Bumps version to 1.2.0 in SKILL.md.

This description was created by Ellipsis for 25b4144. You can customize this summary. It will automatically update as commits are pushed.

Document GitHub repository ruleset architecture requirements for the
rebase-pr workflow. Key learnings from a real failure case where
non_fast_forward and required_linear_history were incorrectly placed
on the all-branches ruleset, blocking force-push of rebased feature
branches.

(claude)
Copilot AI review requested due to automatic review settings March 2, 2026 12:26
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 25b4144 in 10 seconds. Click for details.
  • Reviewed 201 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_BHoNi6prfdwA2oWW

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the documentation for the local rebase-merge workflow. It clarifies the reasons for using this workflow over GitHub's native merge options, particularly concerning commit signing and GitHub ruleset compatibility. The updates provide comprehensive guidance on necessary repository configurations, explain how GitHub's pull_request rule interacts with local rebasing, and introduce troubleshooting for common issues like force-push blocking and ruleset misconfigurations. This aims to improve user understanding and prevent common workflow failures.

Highlights

  • Version Bump: The workflow documentation version has been updated to 1.2.0.
  • Workflow Rationale Expansion: The 'Why This Workflow?' section was expanded to include details on GitHub's gh pr merge --rebase error and the key insight regarding how local push leads to PR auto-closure.
  • Repository Prerequisites: A new section was added covering required local Git configuration for commit signing and a detailed guide on GitHub ruleset architecture, emphasizing correct scope for rules like non_fast_forward and required_linear_history.
  • pull_request Rule Clarification: Documentation was added to explain how the pull_request ruleset rule is satisfied by the local rebase workflow, associating locally pushed commits with an open PR.
  • Phase Updates: Phase 4 and Phase 6 of the workflow were updated with cross-references to the new repository prerequisites, providing context for potential issues.
  • New Edge Cases: Two new edge cases were documented: 'Force-Push Blocked on Feature Branch' and 'Ruleset Misconfiguration — Main-Level Rules on All Branches', offering detection, cause, and action steps.
  • Anti-Pattern Table Enhancements: Two new rows were added to the anti-pattern table, specifically addressing mistakes in placing non_fast_forward and required_linear_history rules on all-branches rulesets.
Changelog
  • git-workflows/skills/rebase-pr/SKILL.md
    • Updated the workflow version from 1.1.0 to 1.2.0.
    • Expanded the 'Why This Workflow?' section to detail GitHub's gh pr merge --rebase limitations and outline the five local steps of the workflow.
    • Introduced a new 'Repository Prerequisites' section, covering essential local Git configuration and recommended GitHub ruleset architecture for different branch protection rules.
    • Added a detailed explanation of how the pull_request rule is satisfied by the local rebase workflow.
    • Updated 'Phase 4: Push Rebased Branch and Wait for CI' with a prerequisite regarding the non_fast_forward ruleset and guidance for force-push issues.
    • Revised 'Phase 6: Push Main' to clarify why the local push works despite the pull_request rule and reiterated why gh pr merge should not be used.
    • Added new edge case sections for 'Force-Push Blocked on Feature Branch' and 'Ruleset Misconfiguration — Main-Level Rules on All Branches'.
    • Appended two new anti-pattern entries to the summary table, specifically addressing non_fast_forward and required_linear_history on all-branches rulesets.
Activity
  • Pull request created by JacobPEvans to add repository prerequisites and ruleset architecture guide to the rebase-pr skill documentation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Document that git push origin main may be blocked by a required CodeQL
status check on the main branch ruleset. The force-push in Phase 4
triggers the CodeQL run, but it may not complete before Phase 6.

(claude)
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is an excellent documentation update that significantly improves the rebase-pr workflow guide. The addition of repository prerequisites, ruleset architecture, and detailed explanations for why certain steps are necessary provides crucial context for users. The new edge cases and anti-patterns, born from a real-world failure, make the documentation much more robust and practical. I have one minor suggestion to enhance clarity in the new ruleset table.

@greptile-apps
Copy link

greptile-apps bot commented Mar 2, 2026

Greptile Summary

This PR enhances the rebase-pr workflow documentation by adding critical repository prerequisites and edge case handling based on real-world failures.

Major additions:

  • Repository Prerequisites section documenting required local git config (commit.gpgsign, user.signingkey, gpg.format) and ruleset architecture principles
  • Ruleset architecture table clarifying which rules belong on all-branches vs main-only rulesets (critical: non_fast_forward and required_linear_history must be main-only to allow force-push on feature branches)
  • Enhanced "Why This Workflow?" section with the exact GitHub error message and explanation of how local rebase solves the signing problem
  • Two new edge cases: Force-push blocked (due to non_fast_forward on all-branches) and ruleset misconfiguration
  • Updated anti-patterns table with two new entries about ruleset scope mistakes

The documentation is comprehensive, technically accurate, and directly addresses the failure scenario mentioned in the PR description (secrets-sync PR #8). All cross-references use proper anchor links and the content follows established markdown conventions.

Confidence Score: 5/5

  • This PR is safe to merge with no risk - documentation-only changes that improve workflow clarity
  • Perfect score because: (1) documentation-only changes with no code modifications, (2) content is technically accurate and addresses real failure scenarios, (3) formatting and structure follow markdown best practices, (4) cross-references are correct, (5) version bump is appropriate for the scope of changes
  • No files require special attention

Important Files Changed

Filename Overview
git-workflows/skills/rebase-pr/SKILL.md Added repository prerequisites section, expanded workflow explanation with GitHub error details, and documented two new edge cases for ruleset misconfiguration

Last reviewed commit: 0d0d2b3

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the rebase-pr skill documentation to better explain why a local rebase workflow is needed in signature-enforced repos and to document the repository/ruleset prerequisites that make the workflow succeed.

Changes:

  • Bump rebase-pr skill version to 1.2.0.
  • Expand rationale section with the GitHub signing limitation and the “push + auto-close” workflow explanation.
  • Add “Repository Prerequisites” guidance (local GPG signing config + ruleset scoping) and new edge cases/anti-patterns around force-push and ruleset misconfiguration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Rewrites the 609-line skill to ~180 lines. Replaces prose explanations
with an ordered sequence of exact commands. Adds ruleset validation
guard, condensed GraphQL validation table, and clear Never/Edge Cases
sections. Version bumped to 2.0.0.

(claude)
Move gpgsign, oneline, worktree, worktrees from inline cspell:words
comment to the repo-wide cspell.json custom words list.

(claude)
@JacobPEvans JacobPEvans merged commit f3d598f into main Mar 2, 2026
5 checks passed
@JacobPEvans JacobPEvans deleted the feat/rebase-pr-docs branch March 2, 2026 16: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.

2 participants