Can any one help me how to integrate github actions with slack.
My Exact point is for every push,pull on any repo in my github the notification should be popup in slack
If you are interested in just receiving notifications from Slack on push/pull events (and others), there are first-class Slack applications that do it. For example, check out this one.
If you are looking for a more customizable solution, where you can formulate the specific message you want to send when very specific conditions are met within your Github actions, check out Slack incoming webhooks. They allow you to send an arbitrary message to slack with a simple HTTP POST request, using something as low key as curl.
If you are looking for a systematic solution rather than solving this problem for yourself in a one-off way, there are more considerations.
Related
at my company we want to make use of the relatively new API feature "Automerge" (not through a UI but through an API call),
However we can't seem to find any documentation of a webhook (or other asyc way) of finding out if a merge request failed and why,
anyone know a way to receive such a notification?
Thanks! :)
Hope this saves some work for someone out there,
we asked Github.com support directly and they said there was no async / webhooky way of doing this (as of Nov 2021).
Here's a quote from the support person when asked if there were a way to find out, here's what they wrote:
There wouldn't be a great way to discern that (reason for failure) and
it may be better when you see that, to use the REST API to Get the
Pull Request to get some additional information.
looking at the documentation as suggested in the quote above it seems that through the "closed" action and "merged" key one could discern whether a merge was successful or not, but without any further information about the failure.
i'm keen to understand if i can use a google sheet / script to receive incoming data from an external (3rd party / non google) webhook.
the webhook requirements:
a defined / expected method from POST (my preferred), PUT, PATCH
an endpoint to post to which, if this is possible, i assume would be something like https://docs.google.com/spreadsheets/d/[sheet_id]/[service_name] or even https://script.google.com/d/[project_id]/[service_name] where ScriptApp can perform handling of the data
method of authentication; the current options available from the sending system are "none" or "oauth"
incoming content; the body is a simple { "id": integer }
oauth inputs include authentication_url, azure_subscription_key, app_key, app_secret, resource_id.
hopefully this is enough information to determine if this is possible. if not then please comment with questions and i'll do my best to answer them. thanks in advance :)
Short answer: Yes, for the most part.
Explanation -
...receive incoming data from an external (3rd party / non google) webhook.
Google Apps Script (GAS) provides a format called as Web Apps where, you write a script to handle incoming requests and "deploy" the Apps Script itself as a web app. In doing so, GAS provides you with it's own endpoint.
Adding this as a point of clarification where the endpoint/URL would not be that of a 3rd party, but that of GAS itself, which will need to be used in a 3rd party's application where they require you to provide an endpoint :)
You only have GET & POST requests (as of now) that can be handled by Apps Script's Web App and not the others that you've stated.
The non-dev, prod-ready link would look something like this - https://script.google.com/macros/s/Unique-Script-ID-Goes-Here/exec
The available auth/permission settings are described here.
The request parameters also describes the format of data that can be processed by the Web App.
Hope this helps but please feel free to ask for any clarifications too, as required.
I'm trying to integrate sonarcloud (not sonarqube) with a Slack channel. I want to have the same behaviour in Slack that the one we have in Github or Travis integration: I mean a push notification on a channel.
In Slack exists the option of a webhook but it's limited because only accepts an input format:
{
"text": "message"
}
On the other side, on sonarcloud, there is the possibility to send a POST message to a webhook, but doesn't exist the chance to choose the format of the message, because it's predefined. Has someone any idea about how to connect these two services?
I have thought to use a AWS lambda in order to adapt the message as a bridge but i'm looking for simpler ideas which do not require more infrastructure.
I've used email notifications from sonar cloud and added Zapier "Gmail-Slack" integration for emails with a specific filter. A bit hacky but it works well.
A little late, but for people who might be looking for the answer on this one. I didn't integrate SonarCloud with Slack (yet), but I've had success integrating both CircleCI and SonarCloud with GeckoBoard using zapier which is an online service. It can accept a webhook and then allows you to connect it to a different service (ie, Geckoboard or Slack) by selecting and modifying values in that webhook before sending it on in the correct format. Quite easy to do as well; no programming and no servers to maintain. Hope this helps.
I want to push notification messages from azure notification hub to the FCM using topics.
Example: I want to send a message to the FCM from notification hub. but this message will be directed to topics. When using postman for example, I just have to send this json:
{
"to" : "/topics/scalability",
"notification":{"body":"topics message sent"}
}
to https://fcm.googleapis.com/fcm/send (while providing the FCM key ofcourse).
By doing this, I am able to receive the notification on a chrome app I put in place (the app is just the same as you can find here
Now my problem is that when I send this same message on Notification hub (Azure), I don't receive it on my web app. My understanding is that the Notification Hub does not push the message (json) in its simple format, but why is that ?
Since I successfully pushed the message to FCM, isn't the FCM supposed to interpret the
"to" : "/topics/scalability
part ?
I found a workaround. I send notifications using the simple version of the Notification hub method:
// Send the message to FCM NotificationOutcome outCome = await this.hubClient.SendGcmNativeNotificationAsync(payload).
I then receive all the messages from my chrome app
Azure Notification Hub supports registering tags with individual device. And you can use tag expressions to target specific sets of devices, or more specifically registrations, when sending a push notification through Notification Hubs. For targeting, you should use tag expression instead FCM ‘to’ property. Please see below article for more details on routing/expressions.
https://learn.microsoft.com/en-us/azure/notification-hubs/notification-hubs-tags-segment-push-message
I know this is an old question but I also was confused by this when starting my first Topics-based notification hub app, so hope this saves someone, somewhere some time. What SHOULD, in my opinion, be explicitly stated somewhere in the azure NH documentation, is that using the hub with PNS such as Firebase will OVERRIDE any PNS specific Topics functionality. My understanding is that if you decide to go the Hub route, you ditch Firebase Topics etc and work exclusively with Hub Tags.
If you think about it, it actually makes a lot of sense as it means the Hub is dealing with Topic filtering rather than firing off all messages and making the PNS systems do their individual things.
So in short, if you go the NH route, you cant use PNS topics, I found the two don't play nicely together.
I'm currently trying to develop a Chrome extension which can receive notifications using GCM. When the extension is first installed, I register it using chrome.gcm.register(['my_sender_id'], function(registration_id) { console.log(registration_id); });.
I would like to send push messages to everyone who has the extension installed. However, the problem is that GCM requires you to specify the registration ID's of everyone you want to send the message to; you can't just send it to everyone who's connected to the sender ID.
While it would be possible to push the registration ID to a database when the extension is installed, and then consult this database each time I want to send a message, this solution seems sub-optimal (also from a security point of view, since the pushing of the registration ID would be done client-side).
However, Google introduced a solution for this a few years ago: topics. It's possible to simply register each device to a 'global' topic (for example) and when you then want to send a message, you only have to specify the 'global' topic as the receiver. However, I can't find how this registration process is done for Chrome extensions. I've looked everywhere, but it seems like Chrome's GCM module doesn't support this yet. Am I correct in this and if so, is there an alternative way to pull this off?
Any help would be greatly appreciated!
If you call chrome.instanceID.getToken and then use the InstanceID API from your server to subscribe to a topic, it seems to work, but then the chrome extension doesn't get messages when you push to that topic, so I'm not sure if Google just needs to enable something on their side to make it work. But this is the closest I could get to it in any case.
firebaser here
Thanks for the great feedback. There is no way at the moment to subscribe to a topic from a browser. We're aware that having such an API would simplify the development model. We'd love to add this to Firebase, but as usual can't make any promises or commitments.