python / python/devguide

Document Gmail search queries/filters

Open
#860 2 comments 0 reactions 1 assignee View on GitHub

@ezio-melotti is already working on this.

Since May 8, 2022.

good first issue help wanted topic-github type-feature
Dominant language
Python
Stars
2.1k
Forks
1k
Avg merge
2d 12h
Merged PRs (30d)
12

Description

I spent some time figuring out some useful search queries for Gmail that can also be used as filters (e.g. to assign label):

  • Issues: subject:(Issue -PR)
    • might miss some issues that include "PR" in the subject
  • PRs: subject:(PR)
    • might include some issues that include "PR" in the subject
    • subject:(PR -Issue) could be used instead
      • it will miss PRs that include "issue" (somewhat more common)
  • Merged PRs: subject:PR ((Merged AROUND 1 "into main") OR (Merged AROUND 1 "into master"))
    • You can add entries for other branches too (e.g. (Merged AROUND 1 "into 3.10"))
    • Still has a few false positives
      • "I merged into main" or "I merged this into main" match (because "into main" is within 1 word of "merged")
      • "I merged this PR into main" doesn't match (because "into main" is 2+ words away from "merged")
  • Closed issues: subject:Issue "closed"
    • quite unreliable -- it matches any issue that contains the word "closed"
  • Closed issues (by a linked PR): subject:Issue "closed AROUND 1 via"
    • pretty reliable, but only works for issues closed automatically by a linked PR

Note:

This should be documented somewhere in the devguide, so that other people could easily copy them to set up filters.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.