Gitlab filters in Gmail
Hi, Gitlab emails are difficult to filter because issues and MRs are not easy to distinguish. I know that Matt has a script which does this, but since that was kind of difficult for me to set up, I resorted to these filters instead and they work pretty well. Matches: from:gitlab ("created a merge request" OR "pushed new commits to merge request" OR ("Merge request" AROUND 1 "was")) Do this: Apply label "MR" Matches: from:gitlab "Issue was closed by" Do this: Apply label "Issue Closed" Matches: from:gitlab "Merge request" AROUND 1 "was merged" Do this: Apply label "Merged" Matches: from:gitlab "Merge request" AROUND 1 "was closed" Do this: Apply label "MR Closed" Issues are not labeled and it doesn't seem possible, but anything that is not a MR should be a Gitlab issue. Marek
Re: Gitlab filters in Gmail
How do you separate gitlab comments on merge requests and issues? Timur On Thu, 2022-07-14 at 05:28 -0400, Marek Olšák wrote: > Hi, > > Gitlab emails are difficult to filter because issues and MRs are not > easy to distinguish. I know that Matt has a script which does this, > but since that was kind of difficult for me to set up, I resorted to > these filters instead and they work pretty well. > > Matches: from:gitlab ("created a merge request" OR "pushed new > commits to merge request" OR ("Merge request" AROUND 1 "was")) > Do this: Apply label "MR" > > Matches: from:gitlab "Issue was closed by" > Do this: Apply label "Issue Closed" > > Matches: from:gitlab "Merge request" AROUND 1 "was merged" > Do this: Apply label "Merged" > > Matches: from:gitlab "Merge request" AROUND 1 "was closed" > Do this: Apply label "MR Closed" > > > Issues are not labeled and it doesn't seem possible, but anything > that is not a MR should be a Gitlab issue. > > Marek
Re: Gitlab filters in Gmail
MRs always appear to have the MR label. Even if some comments don't have it, the whole thread has the MR label if at least 1 message has the label and that's enough. Marek On Thu, Jul 14, 2022 at 7:03 AM Timur Kristóf wrote: > How do you separate gitlab comments on merge requests and issues? > > Timur > > On Thu, 2022-07-14 at 05:28 -0400, Marek Olšák wrote: > > Hi, > > > > Gitlab emails are difficult to filter because issues and MRs are not > > easy to distinguish. I know that Matt has a script which does this, > > but since that was kind of difficult for me to set up, I resorted to > > these filters instead and they work pretty well. > > > > Matches: from:gitlab ("created a merge request" OR "pushed new > > commits to merge request" OR ("Merge request" AROUND 1 "was")) > > Do this: Apply label "MR" > > > > Matches: from:gitlab "Issue was closed by" > > Do this: Apply label "Issue Closed" > > > > Matches: from:gitlab "Merge request" AROUND 1 "was merged" > > Do this: Apply label "Merged" > > > > Matches: from:gitlab "Merge request" AROUND 1 "was closed" > > Do this: Apply label "MR Closed" > > > > > > Issues are not labeled and it doesn't seem possible, but anything > > that is not a MR should be a Gitlab issue. > > > > Marek > >