RFC: Access patch by message-ID
Konstantin Ryabitsev
konstantin at linuxfoundation.org
Wed May 30 00:54:55 AEST 2018
On Tue, May 29, 2018 at 12:37:11PM +1000, Daniel Axtens wrote:
>> Seems like it would be easy to implement a way to access a patch by
>> Message-ID, but there is no such option currently. I would very much
>> like to have something like that, which would allow us to link from a
>> public-inbox archive directly to the patch within patchwork, e.g.:
>>
>> https://patchwork.kernel.org/mid/foobarbaz-message-id@gmail.com
>> ->
>> https://patchwork.kernel.org/patch/12345/
>>
>This sounds good to me. You'd also have to specify a project, because we
>allow the same MID to be present in multiple projects. I hope that won't
>be too much of a problem?
It isn't in my particular use-case, but you can also default to a more
general query if project id is not specified, e.g.:
SELECT id FROM patchwork_patch WHERE msgid=? ORDER BY project LIMIT 1
This will select the project with the lowest ID, which usually
corresponds to the earliest defined project.
Best,
-K
More information about the Patchwork
mailing list