getpatchwork / patchwork

Patchwork is a web-based patch tracking system designed to facilitate the contribution and management of contributions to an open-source project.
http://jk.ozlabs.org/projects/patchwork/
GNU General Public License v2.0
273 stars 82 forks source link

[Feature] Allow assigning commit ID to Accepted patches #569

Closed sorki closed 10 months ago

sorki commented 10 months ago

Recently I was wondering if there's a good way to figure out commit ID of the patch when we only have patchwork URL.

I realized patchwork has only a concept of patches but no ties to actual git repository so it is not straightforward to have these (the IDs are different when submitted to ML and when commited to the repository).

I think this could be implemented in similar manner as Checks - API call that would allow to assigning commit ID to the patch when it gets merged. This can then be automated by watching the git repository or via a client.

I propose adding this to the model, API and displaying on the page showing patch details bellow Message-ID or State field (but only if the patch is Accepted).

I'm willing to work on this if it broadly makes sense.

stephenfin commented 10 months ago

You can already do this using the REST API and likely the XML-RPC API also. For example, using git-pw:

git pw patch update --commit-ref <commit-ref> <patch-id>

Is there something else you'd need here?

sorki commented 10 months ago

Very nice, thank you!