tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* Gmail message ID finder Chrome extension
@ 2020-03-27 16:54 Konstantin Ryabitsev
  2020-03-28  2:07 ` [kernel.org users] " Jason A. Donenfeld
  2020-03-29 14:54 ` Linus Walleij
  0 siblings, 2 replies; 6+ messages in thread
From: Konstantin Ryabitsev @ 2020-03-27 16:54 UTC (permalink / raw)
  To: users, tools

If you're a Chrome and Gmail user, you can try the following extension 
to easily get the message-id of an email without having to "show 
original" and hunting for the right header:

https://chrome.google.com/webstore/detail/gmail-message-id-finder/comcoiiifldaaejpbgbincdkoohihbae

The message-id will be copied to the clipboard with the "rfc822msgid:" 
lead, but current versions of b4 will handle that properly.

I haven't been able to find something similar for Firefox, but perhaps 
this is easy to do with a greasemonkey/tampermonkey extension.

Best regards,
-K

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kernel.org users] Gmail message ID finder Chrome extension
  2020-03-27 16:54 Gmail message ID finder Chrome extension Konstantin Ryabitsev
@ 2020-03-28  2:07 ` Jason A. Donenfeld
  2020-03-29 14:54 ` Linus Walleij
  1 sibling, 0 replies; 6+ messages in thread
From: Jason A. Donenfeld @ 2020-03-28  2:07 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: users, tools

Note that this extension has access to your gmail.com content, and can
also be remotely updated by its original author. I'm not sure I'd be
too happy about having this rando developer being the weakest link in
security posture. However, you can download that and install it
locally, or make it into a bookmarklet or greasemonkey script.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kernel.org users] Gmail message ID finder Chrome extension
  2020-03-27 16:54 Gmail message ID finder Chrome extension Konstantin Ryabitsev
  2020-03-28  2:07 ` [kernel.org users] " Jason A. Donenfeld
@ 2020-03-29 14:54 ` Linus Walleij
  2020-03-29 17:13   ` Konstantin Ryabitsev
  1 sibling, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2020-03-29 14:54 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: users, tools

On Fri, Mar 27, 2020 at 5:54 PM Konstantin Ryabitsev
<konstantin@linuxfoundation.org> wrote:

> If you're a Chrome and Gmail user, you can try the following extension
> to easily get the message-id of an email without having to "show
> original" and hunting for the right header:
>
> https://chrome.google.com/webstore/detail/gmail-message-id-finder/comcoiiifldaaejpbgbincdkoohihbae
>
> The message-id will be copied to the clipboard with the "rfc822msgid:"
> lead, but current versions of b4 will handle that properly.

Actually, but I don't know if I'm unique in this, for my workflow
I'd ideally take that thing a step longer so that the drop down menu
simply had "apply patch" meaning it gets the message ID,
calls on b4 to get the message, and applies it to a certain branch
in a certain local git tree with --signoff.

I anyway use gmail's web UI to read all mail and keep track
of what's processed and not by whether is is read or unread in
gmail.

Are these extensions to say Chrome hard to write? I think
if I wrote an extension like that it could save me hours of work
time, but maybe I'm the only one. I tried to find the source code
for the above extension but no such luck.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kernel.org users] Gmail message ID finder Chrome extension
  2020-03-29 14:54 ` Linus Walleij
@ 2020-03-29 17:13   ` Konstantin Ryabitsev
  2020-03-30 20:31     ` Linus Walleij
  2020-03-31  8:03     ` Geert Uytterhoeven
  0 siblings, 2 replies; 6+ messages in thread
From: Konstantin Ryabitsev @ 2020-03-29 17:13 UTC (permalink / raw)
  To: Linus Walleij; +Cc: users, tools

On Sun, Mar 29, 2020 at 04:54:33PM +0200, Linus Walleij wrote:
> > If you're a Chrome and Gmail user, you can try the following 
> > extension
> > to easily get the message-id of an email without having to "show
> > original" and hunting for the right header:
> >
> > https://chrome.google.com/webstore/detail/gmail-message-id-finder/comcoiiifldaaejpbgbincdkoohihbae
> >
> > The message-id will be copied to the clipboard with the "rfc822msgid:"
> > lead, but current versions of b4 will handle that properly.
> 
> Actually, but I don't know if I'm unique in this, for my workflow
> I'd ideally take that thing a step longer so that the drop down menu
> simply had "apply patch" meaning it gets the message ID,
> calls on b4 to get the message, and applies it to a certain branch
> in a certain local git tree with --signoff.

The way I envision this could work is if we define workflows based on 
labels. E.g.:

1. You label a message with "Accepted"
2. You run "b4 gmail apply Accepted" (or an agent process runs that)
3. We then try to:
   - retrieve patch series using lore and your inbox as sources
   - make an am-ready mbox
   - apply to a branch provided in a mapping config
     "e.g. Accepted->refs/heads/pending"
4. If "git am" fails on a series, we label the thread as 
   "Review-Required" and move to the next one
5. If it succeeds, we add the label "Applied"

You still have to do your own merging, though. :)

> I anyway use gmail's web UI to read all mail and keep track
> of what's processed and not by whether is is read or unread in
> gmail.
> 
> Are these extensions to say Chrome hard to write? I think
> if I wrote an extension like that it could save me hours of work
> time, but maybe I'm the only one. I tried to find the source code
> for the above extension but no such luck.

I wouldn't use a chrome extension for this, but it's fairly 
straightforward to accomplish this with a gmail API. There are a few 
annoying things about Gmail that make it not super great for the purpose 
of working with patch threads. Specifically, Gmail ignores In-Reply-To 
if subjects don't match, so while the API provides a "retrieve a thread" 
call, we can't use it to get a properly threaded patch series the same 
way we can from lore.kernel.org, because Gmail refuses to consider them 
all part of the same thread.

The best we can do is do a search for "from:same sender AND 
date:same-ish date AND subject-contains:PATCH", and then go through what 
we got back to reconstitute the patch series.

-K

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kernel.org users] Gmail message ID finder Chrome extension
  2020-03-29 17:13   ` Konstantin Ryabitsev
@ 2020-03-30 20:31     ` Linus Walleij
  2020-03-31  8:03     ` Geert Uytterhoeven
  1 sibling, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2020-03-30 20:31 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: users, tools

On Sun, Mar 29, 2020 at 7:13 PM Konstantin Ryabitsev
<konstantin@linuxfoundation.org> wrote:

> The way I envision this could work is if we define workflows based on
> labels. E.g.:
>
> 1. You label a message with "Accepted"
> 2. You run "b4 gmail apply Accepted" (or an agent process runs that)
> 3. We then try to:
>    - retrieve patch series using lore and your inbox as sources
>    - make an am-ready mbox
>    - apply to a branch provided in a mapping config
>      "e.g. Accepted->refs/heads/pending"
> 4. If "git am" fails on a series, we label the thread as
>    "Review-Required" and move to the next one
> 5. If it succeeds, we add the label "Applied"

That works for me. I have noticed that some people have this
two-step workflow of first tagging stuff (or moving it to some
folder I guess if they use e.g. mutt) and then as second step
do the application and tag stuff as applied and send out mails.

I usually prefer the more
direct "this one patch, apply it, resolved conflicts done" on a
one-by-one basis that's why I wanted it right in the UI.

But I suppose I can just tag one message at the time if I
insist :D

If there is a series I guess you just tag the 00/nn patch and
it picks the whole series?

Being able to just use gmail is really low threshold and can bring
new maintainers in and up to speed I think.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kernel.org users] Gmail message ID finder Chrome extension
  2020-03-29 17:13   ` Konstantin Ryabitsev
  2020-03-30 20:31     ` Linus Walleij
@ 2020-03-31  8:03     ` Geert Uytterhoeven
  1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2020-03-31  8:03 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: Linus Walleij, users, tools

Hi Konstantin, Linus,

On Sun, Mar 29, 2020 at 7:13 PM Konstantin Ryabitsev
<konstantin@linuxfoundation.org> wrote:
> On Sun, Mar 29, 2020 at 04:54:33PM +0200, Linus Walleij wrote:
> > > If you're a Chrome and Gmail user, you can try the following
> > > extension
> > > to easily get the message-id of an email without having to "show
> > > original" and hunting for the right header:
> > >
> > > https://chrome.google.com/webstore/detail/gmail-message-id-finder/comcoiiifldaaejpbgbincdkoohihbae
> > >
> > > The message-id will be copied to the clipboard with the "rfc822msgid:"
> > > lead, but current versions of b4 will handle that properly.
> >
> > Actually, but I don't know if I'm unique in this, for my workflow
> > I'd ideally take that thing a step longer so that the drop down menu
> > simply had "apply patch" meaning it gets the message ID,
> > calls on b4 to get the message, and applies it to a certain branch
> > in a certain local git tree with --signoff.
>
> The way I envision this could work is if we define workflows based on
> labels. E.g.:
>
> 1. You label a message with "Accepted"
> 2. You run "b4 gmail apply Accepted" (or an agent process runs that)
> 3. We then try to:
>    - retrieve patch series using lore and your inbox as sources
>    - make an am-ready mbox
>    - apply to a branch provided in a mapping config
>      "e.g. Accepted->refs/heads/pending"
> 4. If "git am" fails on a series, we label the thread as
>    "Review-Required" and move to the next one
> 5. If it succeeds, we add the label "Applied"

And remove the "Accepted" label?
Else, as labels applies to conversations, if someone replies with a
full patch, it will be applied next time you run your script.

> You still have to do your own merging, though. :)
>
> > I anyway use gmail's web UI to read all mail and keep track
> > of what's processed and not by whether is is read or unread in
> > gmail.
> >
> > Are these extensions to say Chrome hard to write? I think
> > if I wrote an extension like that it could save me hours of work
> > time, but maybe I'm the only one. I tried to find the source code
> > for the above extension but no such luck.
>
> I wouldn't use a chrome extension for this, but it's fairly
> straightforward to accomplish this with a gmail API. There are a few
> annoying things about Gmail that make it not super great for the purpose
> of working with patch threads. Specifically, Gmail ignores In-Reply-To
> if subjects don't match, so while the API provides a "retrieve a thread"
> call, we can't use it to get a properly threaded patch series the same
> way we can from lore.kernel.org, because Gmail refuses to consider them
> all part of the same thread.
>
> The best we can do is do a search for "from:same sender AND
> date:same-ish date AND subject-contains:PATCH", and then go through what
> we got back to reconstitute the patch series.

Alternatively, select "Download message" in the drop-down menu (repeat
if needed), and run a script on your download directory.
As the downloaded messages contain Message-IDs, they can be fed to
the b4 machinery for further processing of tags and series, augmented
by data from lore.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-31  8:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 16:54 Gmail message ID finder Chrome extension Konstantin Ryabitsev
2020-03-28  2:07 ` [kernel.org users] " Jason A. Donenfeld
2020-03-29 14:54 ` Linus Walleij
2020-03-29 17:13   ` Konstantin Ryabitsev
2020-03-30 20:31     ` Linus Walleij
2020-03-31  8:03     ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).