Currently, we're using an organization-level generic-webhook for all our repo.
Recently we had added new repo repo. which needs to be use only repo level generic-webhook for some reason.
Is there any way, So that i can call only repo level generic-webhook and ignore organization level webhook ?
I don't believe there's any way to do this. GitHub delivers a lot of webhook events and users generally want them delivered right away. In order to make webhook delivery as speedy and efficient as possible, there aren't any filtering options on GitHub's side. You're expected to receive all the events you're subscribed to and filter them yourself.
If you want the organization-level webhook to not operate on this particular repository, you'll need to configure your service that receives the webhook itself not to act on those messages.
Related
I need a way to get when a reviewer for a GitHub PR was requested using their API, but looking through the documentation there seems to be no way to do it. Is there any way that I can get the information I need?
If you want to be notified when a pull request review was requested, you can set up a webhook for the pull_request event. Then, you can listen for the review_requested and review_request_removed actions and do whatever you'd like in response.
Note that with GitHub webhooks, you will get all of the messages for a particular event, and you're responsible for filtering out the ones you want. GitHub doesn't provide filtering capabilities.
Does anyone know if you can trigger a webhook based on the github action of creating a new branch called
Release-xxxx where XXXX can be anything? I only want to initiate this webhook on that new branch name.
In general, GitHub webhooks cover a single large category of activities that you are then responsible for filtering. In your case, you can install a webhook to be notified when a new branch or tag is created and then perform the filtering yourself.
GitHub doesn't perform the filtering for you because filtering is expensive and there are a lot of operations to notify about. This is no different than reading an events stream API and having to select only the events that you're interested in.
I wish to trigger an action(maybe send a mail/alert) when the code is committed only for my team members which is a very small subset of large number of contributors. Is there a way to track commits only from certain specific users in Github/Gitlab.
Yes! You can even automate this process using a webhook. In case you aren't familiar - a webhook delivers a JSON payload when a certain event occurs.
By setting up a webhook on the GitHub push event you'll create alerts every time a push is made to your repository. You can create a small script that scans the author value. If the value matches one of your team members you can configure your alert/mailer, otherwise you can configure your script to ignore the webhook's payload.
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.
The webhooks guide lists email as one of the available services, however it seems that this only kicks off when a user actually pushes a change to the repository. How can you configure it so that an email is fired off for every event concerning that repo - issues opened/closed, pull requests, etc.?
You cannot, currently. See this pull request to the github-services which would enable at least pull request notification by email, but it was never merged by GitHub.
As a work-around I currently use IFTTT on my Android device to get notified about pull requests by email.