Patch review workflow on SourceHut

From postmarketOS
Jump to navigation Jump to search

postmarketOS is considering to move all source repositories to SourceHut, as announced here. For evaluation purpose we have moved pmbootstrap.git to SourceHut. This article documents the patch review and merge workflow we are using on SourceHut.

Reviewing patches

Feel free to expand this, but roughly:

  • Quote lines from that patch and leave your comments below
  • Add Acked-By, Reported-by:, Tested-by:, Reviewed-by: to the commit message. See kernel doc as reference.

Applying patches to a local tree

You can apply the patch files directly from your mail client if you wish to. If you plan to merge the patches, please use the following workflow so commit messages get extended with Reviewed-By: etc. trailers from the thread:

$ b4 am -l 36506
Looking up
Resolved to
$ git am ./20221031_luca_pmb_parse_kconfig_add_wireguard_filesystems_more_to_community_check.mbx

Instead of the short review ID, one can also use the full message-id, in the example above. Might be useful for scripting this into your mail client.

Merging patches

  • The person merging the patches must review them again.
  • You can merge multiple patchsets at once.
  • CI must pass before pushing patches to master. (Skip this if doing a cosmetic change.)
    • CI runs for each patchset submitted to the mailing list (right now that seems broken, reported it, will probably be solved soon)
    • If CI didn't run on the ML or if you merge multiple patches at once / had to rebase them, run CI locally with pmbootstrap ci
  • Push the patches to master
  • Let people on the ML know:
    • Reply to the mail thread that the patch set has been applied
    • Set the patchsets on SourceHut to applied
    • (you can do both at once with a mail header as described here)

See also