spr

repository·master·Indexed 23 days ago

https://github.com/ejoffe/spr

A client-side git integration tool for managing stacked pull requests on GitHub. It allows developers to work in small, atomic chunks of code by automating branch management, rebranching, and synchronization. Key features include commands for updating, merging, and amending commits in a stack, as well as a GitHub client for interacting with the GitHub API, managing reviewers, and supporting merge queues.

Tokens
1.9K
Snippets
2
Records
24
Agent score
79%

What's inside spr

  1. Understanding SPR status indicators

    master

    The git spr update command provides visual feedback on the status of your pull request stack using check marks.

    • A pull request is considered ready to merge when it has four check marks (e.g., [✔✔✔✔]).
    • Four check marks indicate that the PR has:
      1. Passed all checks.
      2. Received an approval.
      3. Has no conflicts.

    Partial check marks (e.g., [✗✗✔✔]) indicate that the PR is still pending checks, approvals, or conflict resolution.

  2. Merge pull requests with spr merge

    master

    Once your pull requests have passed all checks, received approvals, and have no conflicts (indicated by four check marks in the CLI output), they are ready to be merged. Use git spr merge to merge all pull requests that are currently in a ready state.

    > git spr merge
    MERGED github.com/ejoffe/spr-demo/pull/1 : Feature A
    
    [✗✗✔✔] github.com/ejoffe/spr-demo/pull/2 : Feature C
    [✗✗✔✔] github.com/ejoffe/spr-demo/pull/2 : Feature B
  3. Use the spr CLI

    master
    The spr CLI is used to manage Stacked Pull Requests on GitHub. It provides commands for viewing status, synchronizing local stacks with remote, updating pull requests, merging, and editing commits within a stack.
  4. Create and synchronize pull requests with spr update

    master

    SPR manages stacks of pull requests by treating each git commit as an atomic unit of work. To create a new pull request, commit your changes and run git spr update.

    If you add new commits, amend existing ones, or reorder your commit stack, running git spr update will automatically synchronize your pull requests to match your current commit lineage. SPR handles the rebranching and updating of the underlying GitHub branches for you.

    > git commit -m "Feature A"
    > git spr update
    [--✔✔] github.com/ejoffe/spr-demo/pull/1 : Feature A
  5. Configure spr update behavior via environment variables

    master

    The spr update command respects several environment variables for controlling rebase and fetch behavior:

    • SPR_NOREBASE: Disables rebasing.
    • SPR_FETCH: Enables fetch (overrides noFetch config).
    • SPR_NOFETCH: Disables fetch.