webhooks | : fishing_pole_and_fish : Webhook receiver for GitHub
kandi X-RAY | webhooks Summary
kandi X-RAY | webhooks Summary
[GoDoc] ![License] Library webhooks allows for easy receiving and parsing of GitHub, Bitbucket and GitLab Webhook Events.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of webhooks
webhooks Key Features
webhooks Examples and Code Snippets
Community Discussions
Trending Discussions on webhooks
QUESTION
We are developing a MS Teams application (using incoming webhooks to deliver messages from our SaaS app into Teams) and have noticed that when creating new connectors using the MS Connectors Developer Dashboard (https://outlook.office.com/connectors/publish) the connector install process no longer functions as it used to.
Up until about a week ago, the connector install process involved the connector configuration page being loaded as an iframe within the teams app install modal. This is exactly as described and expected in the MS docs here: https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-creating
This install process should look like this: Working connector
Currently, when creating connectors, the resulting install flow looks like this. (Notice how it no longer renders configuration screen in iframe, but instead links to it): Broken connector
I have diff'ed the application manifest and confirmed the only difference in setup is the connector ID. I've also double checked that all the connector fields (valid domains, configuration URLs etc.) are exactly as before. The change seems to be on Microsoft side. My old connectors created earlier this month continue to work OK
My question is, what is this new install flow that I'm seeing and why is it suddenly showing up now? How can I tell Teams to go back to using the old install flow for my new connectors.
Other details that may be relevant:
- I've tried creating connectors in two separate MS Office accounts, both work the same way
- The app is NOT yet published, I'm testing locally by uploading and approving within our company's Teams account
- I've confirmed the configuration endpoint is viewable from the outside world and have found now network errors in the teams app that would explain it failing to load.
ANSWER
Answered 2022-Mar-17 at 16:30Microsoft Teams support were able to confirm that there was an issue and that it was resolved and rolled out on March 15 2022. I have since confirmed that I am able to create and install teams apps.
Thank you to Meghana for keeping me in the loop about progress.
QUESTION
I'm trying to create a PS script that is supposed to post MS Teams alerts via webhooks, regarding some metrics. The current solution that I have almost made work is via a PSCustomObject, which is afterwards converted to JSON and used as the body of the alert. The below is the current code that I am using:
...ANSWER
Answered 2022-Jan-27 at 15:09The teams interface seems to accept HTML:
Please see your script adjusted below:
QUESTION
We got a task to receive alerts from Prometheus to our internal system. The prometheus itself isn't alert manager, but just the Prometheus server, can we receive webhooks like the alert-manager?
...ANSWER
Answered 2022-Jan-20 at 18:52can we receive webhooks like the alert-manager?
You can receive HTTP POST requests from Prometheus if you configure your application as an Alertmanager:
QUESTION
I'm in need of integration of JFrog with Gitlab. My main goal is to delete all artifacts in JFrog automatically after specific branch is deleted. I've read about webhooks, but I am not certain how to use them effectively. What is the best solution for this kind of problem?
...ANSWER
Answered 2021-Dec-29 at 14:11You can delete Artifactory artifacts using the JFrog CLI:
QUESTION
In GitHub Enterprise, we have Project A under Organization A. When I submit a PR (pull request) to Project A, the continuous-integration/jenkins/pr-merge
is triggered which runs a Jenkins pipeline to build the code and perform unit tests. This allows us to prevent the PR from being merged into master if the unit tests fail.
For example, this is what I see on a PR for Project A in GitHub that includes a broken unit test:
Now I am trying to configure Project B under Organization B to behave the same way. However, it is not working. This is what I see on a PR for Project B in GitHub that includes a broken unit test:
Notice that Project B's PR did not kick off the continuous-integration/jenkins/pr-merge
.
GitHub -> Settings -> Branches -> Branch protection rules
Project A in GitHub has a branch protection rule for master
with only one setting enabled:
- Require pull request reviews before merging
Interestingly, the "Require status checks to pass before merging" setting is not enabled. Out of curiosity, I enabled it (without saving it) and noticed that "continuous-integration/jenkins/pr-merge" showed up below it as an option.
I configured Project B to have the exact same branch protection rule for master
with only "Require pull request reviews before merging" enabled. Out of curiosity, I enabled "Require status checks to pass before merging" (without saving it) and it doesn't even show continuous-integration/jenkins/pr-merge
as an option. It just says "No status checks found. Sorry, we couldn’t find any status checks in the last week for this repository."
GitHub -> Settings -> Hooks -> Webhooks
Project A in GitHub has a webhook configured with:
- Payload URL
https://jenkins.mycompany.com/github-webhook/
- Content type
application/json
- Let me select individual events: Pull requests, Pushes, Repositories are checked
- Active: checked
I created a webhook for Project B with the exact same settings. After I submitted a PR for Project B, I see a couple of items under "Recent Deliveries" for Project B's webhook with green checkmarks and "200" response codes, so I think it is configured correctly.
CloudBees Jenkins Enterprise
In Jenkins Enterprise, Project A's pipeline is of type "GitHub Organization" and has the following settings:
- API endpoint: kubernetes-cbs-automation (https://git.mycompany.com/api/v3)
- Credentials: [credentials specific to Project A]
- Owner: [Project A's GitHub organization]
- Behaviors: Repositories: Filter by name (with regular expression): Regular expression: [name of Project A's GitHub repo]
- Behaviors: Within repository: Discover pull requests from origin: Strategy: Merging the pull request with the current target branch revision
- Project Recognizers: Pipeline Jenkinsfile: Script Path: ci-cd/jenkins/ProjectA-pipeline.groovy
- Property strategy: All branches get the same properties
- Scan Organization Triggers: "Periodically if not otherwise run" checked: Interval: 1 day
- Orphaned Item Strategy: "Discard old items" checked
- Child Orphaned Item Strategy: Strategy: Inherited
- Child Scan Triggers: "Periodically if not otherwise run" checked: Interval: 1 day
- Automatic branch project triggering: Branch names to build automatically: .*
I created an item under Project B in Jenkins Enterprise of type "GitHub Organization" with the same settings (except any settings specific to Project A were replaced with the appropriate Project B specific settings).
What is wrong/missing?Given that GitHub PRs for Project B are failing to launch the continuous-integration/jenkins/pr-merge
, it seems like there is some configuration that I am missing. Unfortunately, our GitHub/Jenkins admins have not been able to figure out what is wrong.
UPDATE
We have confirmed that Project B is actually launching a build on the Jenkins agent when a PR is submitted. The problem is that GitHub is not showing the continuous-integration/jenkins/pr-merge
on the web page for the PR. We need that so the PR can be blocked if the build fails, and also so that we can quickly see what went wrong.
ANSWER
Answered 2021-Dec-08 at 20:18Posting as answer the resolution we got in the comments.
The issue was that the user who's token was used in Jenkins did not have the right level of access to post status checks on the repository.
Differences between the Orgs and Projects
- OrgA/ProjectA - the user is a Member of the organisation (OrgA) also added in the Collaborators section of the repo with Read access, as well as member of a Team with Write access on the repo itself (ProjectA).
- OrgB/ProjectB - the user was a Member of the organisation (OrgB) and also in the Collaborators section on the repo itself (ProjectB) but with Read access.
This caused the issue on projectB status checks not being populated with Jenkins' information from the builds:
continuous-integration/jenkins/pr-merge
missing from the status checks of GitHub repository.
Summary:
When setting up a connection between GitHub and Jenkins we need to provide the user holder of the token with the required access.
In this case we want to update the github status which needs Write access level:
The token of the user should have scope repo:status
QUESTION
Trying to follow this tutorial.
When I right click the workflow.json and select Open in Designer, I finally get the following message.
...ANSWER
Answered 2021-Nov-15 at 15:20i had the same issue. In my case the solution was to go under Control Panel and uninstall Azure Function Core Tool (4.x) (if available). Afterwards open your Powershell and run following command:
npm install -g azure-functions-core-tools@3 --unsafe-perm false
QUESTION
I need to actively receive crash notifications for firebase functions.
Is there any way to set up Slack webhooks to receive a message when Firebase Functions throw an Error, functions crash, or something like that?
I would love to receive issue messages by velocity ie: Firebase Functions crash 50 times a day.
Thank you so much.
...ANSWER
Answered 2021-Oct-27 at 06:29First you have to create a log based (counter) metric that will be counting specific error occurencies and second - you create alerting policy with Slack notification channel.
Let's start from finding corresponding logs that appear when the function throws an error. Since I didn't have one that would crash I used logs that indicated that it was started.
Next you have to create a log based metric. Ignore the next screen and go to Monitoring > Alerting. Click on "Create new policy", find your metric and select "Rolling Window" to whatever time period you need. For testing I used 1 minute. Then set "Rollind windows function" to "mean".
Now configure when the alert has to be triggered - I chose over 3 (within 1 minute window).
On the next screen you select notification channel. In case of Slack it has to be configured first in "Notification Channels".
You can save policy the policy now.
After a few minutes I gathered enough data to generate two incidents:
And here's some alerting related documentation that may help you understand how to use them.
QUESTION
I am having a hard time figuring out a reliable and scalable solution for a webhook dispatch system.
The current system uses RabbitMQ
with a queue for webhooks (let's call it events
), which are consumed and dispatched. This system worked for some time, but now there are a few problems:
- If a system user generates too many events, it will take up the queue causing other users to not receive webhooks for a long time
- If I split all events into multiple queues (by URL hash), it reduces the possibility of the first problem, but it still happens from time to time when a very busy user hits the same queue
- If I try to put each URL into its own queue, the challenge is to dynamically create/assign consumers to those queues. As far as
RabbitMQ
documentation goes, the API is very limited in filtering for non-empty queues or for queues that do not have consumers assigned. - As far as
Kafka
goes, as I understand from reading everything about it, the situation will be the same in the scope of a single partition.
So, the question is - is there a better way/system for this purpose? Maybe I am missing a very simple solution that would allow one user to not interfere with another user?
Thanks in advance!
...ANSWER
Answered 2021-Aug-26 at 10:12You may experiment several rabbitmq features to mitigate your issue (without removing it completly):
Use a public random exchange to split events across several queues. It will mitigate large spikes of events and dispatch work to several consumers.
Set some TTL policies to your queues. This way, Rabbitmq may republish events to another group of queues (through another private random exchange for example) if they are not processed fast enough.
You may have several "cycles" of events, varying configuration (i.e number of cycles and TTL value for each cycle). Your first cycle handles fresh events the best it can, mitigating spikes through several queues under a random exchange. If it fails to handle events fast enough, events are moved to another cycle with dedicated queues and consumers.
This way, you can ensure that fresh events have a better change to be handled quickly, as they will always be published in the first cycle (and not behind a pile of old events from another user).
QUESTION
How do you create a webhook from curl or github cli?
This doc. does not help a lot: https://docs.github.com/en/rest/reference/repos#create-a-repository-webhook--code-samples
Tried this:
...ANSWER
Answered 2021-Oct-08 at 14:45You can use the following to create a webhook:
QUESTION
I'm trying to use Teams webhooks in a GCP monitoring notification channel. The webhook URL was created by viewing the guide below. https://docs.microsoft.com/en-us/outlook/actionable-messages/send-via-connectors
But there seems to be no action in the test connection. Can't I use the GCP Monitoring notification channel in Teams by linking it with a webhook?
...ANSWER
Answered 2021-Oct-06 at 14:50Clone the source from the github link and import it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install webhooks
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page