Sending a notification Via Push API or Push-bullet when a new GitHub release is published for a repo? - github

One problem with our app was that it was published on Github, so the users have to actively check for a new update. Then it shook me, what if we send a notification (automatically) when releasing a new version of the app? But it was a lot complicated than what I expected. I would like to do this via our apps website.

You need to setup a webhook associated to a release event.
The URL of that webhook must reference a server you control, and on which you have installed dgryski/ghpbhook
This is a endpoint for github and bitbucket post-receive webhook notifications.
It uses PushBullet to send a summary of the commits to your Android device.
You need to adapt that project in order to decode a release payload (instead of a commit payload).
But it gives you an idea of:
how to listen for the webhook JSON payload
how to send a notification through PushBullet

Related

GitHub: force new review after code changes on a pull request [duplicate]

Once a pull request is approved, if there are further commits:
The Pull request should go to un-approved state automatically.
Can this be done?
The ability to Dismiss stale pull request approvals when new commits are pushed is a setting under Require pull request reviews before merging in the branch protection settings. This is disabled by default.
This isn't currently offered.
You can create an application that listens for push webhook events, queries the API for all Reviews for a Pull Request, and dismisses any that are APPROVED.
Here is a Ruby script you could host on heroku.

How to add the commit's description to the discord webhook bot messages?

I followed this tutorial to create a Webhook between Github and Discord.
https://support.discordapp.com/hc/en-us/articles/228383668
Everything worked as expected and the bot is updating the chat just fine.
Despite searching in the Docs
( https://discordapp.com/developers/docs/resources/webhook ), I
could not find how to configure the bot so it also displays the commit's description.
I don't really know if this is possible, can someone point me how to handle this?
The Discord GitHub webhook does display the first line of the commit which git typically treats as a summary.
The GitHub push webhook publishes a json document containing fields such as head, refs, and a commits array with fields such as message and author.
However, the default Discord webhook expects a simpler json document with just a content field for the message body. This webhook will reject a GitHub push document.
However Discord also provides a special GitHub webhook that understands the payload of the GitHub push webhook. You've set this up but as noted only displays the first line of the commit. There doesn't seem to be any way to customize it.
If you want to display the full commit message, you'll need a custom bot that can receive the GitHub push event, format a new json document in the form expected by the default Discord webhook, and send it to the Discord API.
There is already an app that does this. The developer has abandoned it in favor of the official Discord GitHub webhook but left it running for now. It's easy to integrate and it does display the full commit message. It does require a public GitHub repository however.

Send notification through Azure Notification Hub in new Portal

How to use 'test send' tile/option in the Azure Notification hub. Where to add the Registration ID/ Token ID in the Portal. How to use it. Please suggest me some articles on this. Here is the exact picture
I just started using Notification hub. I don't prior experience on push notifications or azure notification service.
When you register device on azure push notification service - it creates new entity on its notification hub.
This entity has 3 main fields: registrationId, deviceTokens and tags.
Test send works with tokens. Tokens are just like tags in Instagram or Stackoverflow. You can pass there something like user name and send on all user devices by one send.
Also you can pass device token in tag, or regId. So you can test send test notification on selected device.
P.S. Best way to work with azure services: Visual Studio. You can connect your azure hub, watch the list of your registered devices (regId, deviceToken, tokens and expiration dates(you can not do it in azure console)) (also you can use test send by VS)

How do you configure a github organization's repo to send notification emails about all events?

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.

How to automatically send out non-team member emails after github milestone has been closed?

After a github milestone has been closed, I want to have github configured so that it automatically sends an email that the milestone has just closed to a non-team member (my CEO)?
Is there a simple configuration option I am missing?
You can either use the Repo Hooks API and get notified either by a JSON HTTP Request or subscribing to issue events via PubSubHubbub about milestone changes, or you can use the Milestones API and have your repository users manage milestone statuses through an internal application you've purposefully built for notifying other members about milestone changes.