freedomofpress / securedrop

GitHub repository for the SecureDrop whistleblower platform. Do not submit tips here!
https://securedrop.org/
Other
3.62k stars 685 forks source link

feat: make `backport.py` more flexible for complex pull requests #7260

Open cfm opened 1 month ago

cfm commented 1 month ago

Status

Ready for review

Description of Changes

The much-loved backport.py script makes 2.5 assumptions that do not hold for complex pull requests like #7143, which we fix here:

  1. There are fewer than 30 commits (the default number of results returned by gh api) in the pull request.
  2. All commits can be merged naïvely via a mass git cherry-pick -x (i.e., there are no merge commits requiring git [cherry-pick → merge] -m).
    1. All of the commits in the pull request should be backported.

Testing

Depending on the state of your local release/2.10.1 branch, you can replicate #7257 with:

$ git branch -D release/2.10.1
$ git checkout -b release/2.10.1 release/2.10.0
$ utils/backport.py 7143 2.10.1 origin --skip 6e3d7bed17537fa8f69f941f21a8eec34e8da113

Deployment

Development-only; no deployment considerations.

cfm commented 4 days ago

Currently blocked on #7339.

cfm commented 5 hours ago

Rebased from develop after #7339.