How to get specific github notifications like pull requests or assigned issues? - github

Github provides notifications via mail or web, based on watched repos. But is there a way to get more in detail? Like only watch a specific pull requet or assigned issue? I feel like i get spammed from comments on other pull requests that have nothing to do with me.

Update Nov. 2020: you now have "Custom notification controls"
This week we are giving you more control over the types of content that you are notified about on GitHub:
Watching a repository can often be a double-edged sword.
You want to stay up to date with a project, but if you have a specific interest or role within the community, you have no choice but to subscribe to updates on everything.
No more.
Beneath the watch button, you’ll find that we have made a few changes: we’ve made the language clearer so you know what you’ll receive updates about, we’ve made the interface more accessible and, we’ve introduced a new custom category.
Within this, you can select the types of content you would like to be notified about.
Do you focus on code review? Limit your notifications to pull requests.
Are you a community manager? Select Discussions.
As new types of notifications are added, you’ll find them in this menu.
You’ll find these controls on all repository pages and on your watching page where you can customize notifications for repositories you already watch.
Update May 2019: you now have "Custom thread subscriptions"
You can now limit the types of notifications you receive for any issue and pull request to be specific to merge, reopened and/or closed events.
That should allow to further control the amount of emails received.
Update July 2017: you now can declare in the GitHub repo a code owner.
Any pull request touching a file managed by said code owner will trigger a notification to that person.
See "Repo owner automatic notification after updating a pull request"
2015: Yes, for instance, for a specific issue on a project (issue 2595), you can register by clicking the "Subscribe" button at the right side of the page (since 2015).
Once clicked, it will appear as "Unsubscribe" (for you to click if you don't want any more notifications)
So you don't have to watch the all repo, you can subscribe only to specific issues.

Not sure if this has changed, but now there's a subscribe button in the top right corner:
https://help.github.com/articles/subscribing-to-conversations/

first disclaimer, Im part of the team at zigi.ai
Instead of getting notifications for every activity on Git via email or web, Zigi integrates with your Github to learn your pull request activity,
Filters the information and sends you actionable notifications on your pull requests activity (from all repos) that is relevant to your work directly from Slack.
Once a PR is created in GitHub, Zigi manages the entire workflow:
Gathers all the communications related to a PR- that's relevant to
you
Tells me which PRs are waiting for my review from all repos
Shows which of my PRs are waiting for a teammate's review and for how
long
Makes it easy to ping teammates to remind them (without feeling
awkward about bothering them)
Lets me add reviewers
Tells me when a PR is stuck or open for a long time
Helps me make sure the code owner approved
See here an example of a Slack message with filtered notification for pull request

Related

Subscribing to a git repository on slack

Can someone tell me like I'm 5 on subscribing to a git repository on slack? My google-fu is not giving any answers.
I have five repositories, none of which I'm the owner on. I want a slack notification when there's a push to these repositories. If I type /github help I get a list of commands and it says I should be able to subscribe by "/github subscribe owner/repository"
I'm not sure which people on my team "own" the repository and I'm not sure where this information is in github.
I read somewhere I could just do /github subscribe and paste the full https link, but I get this back
If I click Install button I get a page that says "Where do you want to install slack?"
If I select configure under my github main repo, I get this:
If I start adding repositories, everyone on my team gets an email notification to add slack to github. I don't get an email notification. Nothing happens at all. Then everyone in the company pings me asking me why they're getting slack/github notifications. To prevent further humiliation, I just stopped trying to add the repo. I'd still like to add it though.
I should be able to subscribe by "/github subscribe owner/repository"
I'm not sure which people on my team "own" the repository and I'm not sure where this information is in github.
I just wanted to help with this part, since I recently had to figure that same thing out. The owner is the organization that your repositories belong to. So, lets say you have a repo named "RepoOne". If you click into that repo, the URL in the address bar should show: "https://github.com/[owner]/RepoOne"
So, you should be able to copy the owner and repo name from your URL and use it in the command as follows:
/github subscribe [owner]/RepoOne
Keep in mind, that only subscribes you to the isssues, pulls, commits, releases, and deployments. I like to include the reviews and comments too, so I go with:
/github subscribe [owner]/RepoOne reviews comments

Slack pull request integration

Is there a way to set up a git hook to alert a developer when someone has commented on their pull request. It is frustrating that I stumble on a comment days after it has been posted
Check out the new github app in the Slack App Directory. It sends notification about almost every change on your git to Slack, including comments.
The main project for GitHub/Slack integration is github.com/integrations/slack.
It does include repository activity:
Subscribe to an Organization or a Repository On repositories, the app notifies of open, close, and re-open events on pull requests and issues in repositories you've subscribed to.
It also notifies of any push directly to the repository's default branch as well as comments on issues and pull requests.
However, regarding comments, see issue 578:
If issue is closed with a comment, the comment should be included in the Slack notification
A lot of times the final comment has some context on why the issue is being closed (e.g. fixed, duplicate, something else). If someone clicks the "comment and close" button, it seems helpful to include that comment to the "issue closed" Slack notification.
So you don't always have every comment every time.
Note: today, GitHub adds "New improvements to the Slack and GitHub integration", namely new Slack commands, but nothing regarding comments.

Receive github issue notifications but not pushes

I have 3 related github repos, with associated issue trackers. I'd like to get email when anything happens in the issues, but not whenever someone pushes, or makes a pull request. I don't see the ability to control notifications at this level of granularity.
I know that I can unsubscribe from specific threads, but that doesn't give me what I want either.
Alternatively, if there was a way to tell which type of notification it is in the email, so I can set up a filter, that would be fine too. However, I haven't been able to determine a consistent difference on that front either.
That's not possible currently using the features GitHub offers. However it may be possible using GitHub API.
I'd like to get email when anything happens in the issues, but not whenever someone pushes, or makes a pull request.
All Pull requests are issues but not all issues are Pull requests. That's being said, you cannot [currently] unsubscribe from pull requests and get the issues, since the pull requests are issues.
Since you are developer you can develop your own app to notify you (send you emails) when new issues are opened to specific projects.
Taking IonicaBizau/git-stats as example, you can access the issues like this:
https://api.github.com/repos/ionicabizau/git-stats/issues
You will get 304 Not Modified if there are no new issues. That way you can check if there were added new issues or not. Checking if the issue is pull request is done by checking if there is a pull_request field in the object, like mentioned here.
An alternative that I just found, is the Message-ID field of the email. the pull and merge emails all have <org/repo/pull/....> the issue emails have <org/repo/issue/....> so, I can filter on the Message-ID field.

Is it possible to add webhooks to a gist?

Basically, the same way as I can set up a push webhook for a Github repo, can I set it up for a Github gist? I looked around, and I suspect not since there's no documentation for it.
If it is impossible, is there anyway to get notifications whenever a gist is updated? If not, I'm ready to implement a solution that polls every few minutes, but I prefer the notification based solution.
Well, I confirmed it for myself. Github doesn't allow any kind of code to be run on its server's during/before/after a push, so it has webhooks for developers to take advantage of that. Gist does not support either actual Git hooks or Github webhooks.
is there anyway to get notifications whenever a gist is updated?
Since May 8th, 2019, it is possible.
See "Gist notifications "
You can now receive notifications for new conversations occurring on gists. Similar to issues and pull requests, you can opt out of these notifications at any time.
The documentation now includes:
Receiving notifications for gist activity
You'll receive a notification when:
You are the author of the gist.
Someone mentions you in a gist.
You comment in another persons's gist.
You subscribe to a gist, by clicking Subscribe at the top any gist.
In your case, maybe you can combine that with GitHub Actions, which does allow some code execution on the server side, including some involving notification.

Github notifications - Mail to PR creator

If I raise a Pull request and if I need to be notified by a mail saying --
You have created a Pull request for "bla bla" on "so and so" date.
On merge - I get a notification
On comment - I get a notification
So my question is...
Are there any such settings in github which sends a mail to PR creator?
Can I tag myself in the PR comment ?
Any help !!
Are there any such settings in github which sends a mail to PR creator?
There's currently no setting in GitHub that makes the platform work in that way. Note: You can send an email to support#github.com to request for such a feature.
Can I tag myself in the PR comment ?
Yes, you can. But that won't trigger an email sent to your mailbox
However, if what you're after is keeping track of your own activity on GitHub, there may exist another alternative: GitHub exposes atoms feeds for various endpoints. The user is one of them. Register your own feed in a RSS reader and you're done.
Syntax: https://github.com/{:user}.atom
Sample: https://github.com/mojombo.atom
I'm surprised that despite being up for so long, this question hasn't really been meaningfully addressed. Axibase designed a cool little tool which can do exactly what you're describing here: if a PR is raised in one of your repositories you'll be notified via email or third-party messenger service.
By default the rule will fire when anyone raises a PR, but it can be configured to only respond to specific users as that seems to be one of your requests.
The workflow here describes the underlying mechanics of the tool and this guide will take you through the entire set-up. The whole process should only take about 10 minutes from start to finish.
Disclaimer: I've worked for the team that develops ATSD, which is the database at work here.