Skip to content

Instantly share code, notes, and snippets.

@ictus4u
Forked from ldez/gmail-github-filters.md
Created July 30, 2022 03:23
Show Gist options
  • Save ictus4u/af9390244ac3809ddf55e42799950c82 to your computer and use it in GitHub Desktop.
Save ictus4u/af9390244ac3809ddf55e42799950c82 to your computer and use it in GitHub Desktop.
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

label: gh-pull-request

from:([email protected]) subject:"PR \#" 

Note: special characters like ( or # are ignored and the escape \ doesn't work.

before 2021-10-11

from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed AROUND 1 commit" "pushed AROUND 2 commits"}

Assignments

label: gh-assignments

from:([email protected]) cc:([email protected])

Mentions

label: gh-mentions

from:([email protected]) cc:([email protected])

Review Requested

label: gh-review-requested

from:([email protected]) {cc:([email protected]) "requested your review on"}

GitHub emails

  • subscribed: The notification arrived because you’re watching the repository.
  • manual: The notification arrived because you’ve specifically decided to subscribe to the thread (via an Issue or Pull Request).
  • author: The notification arrived because you’ve created the thread.
  • comment: The notification arrived because you’ve commented on the thread.
  • mention: The notification arrived because you were specifically @mentioned in the content.
  • team_mention: The notification arrived because you were on a team that was mentioned (like @org/team).
  • state_change: The notification arrived because you changed the thread state (like closing an Issue or merging a Pull Request).
  • assign: The notification arrived because you were assigned to the Issue.
  • review_requested: The notification arrived because your review is required.
  • ci_activity: The notification arrived because CI activities (failure, success, ...)

example:

Approximate rules

WARNING: Those rules can produce false-positives.

Closed (~)

label: gh-closed

from:([email protected]) "Closed \#"

Note: special characters like ( or # are ignored and the escape \ doesn't work.

Merged (~)

label: gh-merged

from:([email protected]) "Merged \#"

Note: special characters like ( or # are ignored and the escape \ doesn't work.

Issue (~)

label: gh-issue

from:([email protected]) subject:("Issue \#" -"PR \#")

Note: special characters like ( or # are ignored and the escape \ doesn't work.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment