From 1ec494fb0de4415d058356dce74e1378e92a99e3 Mon Sep 17 00:00:00 2001 From: Benjamin Balder Bach Date: Sun, 25 Apr 2021 13:26:02 +0200 Subject: [PATCH 1/6] Clarify version number for which the example works #461 changed option name and in https://github.com/adnanh/webhook/pull/528#issuecomment-826165812, @moorereason suggests to look at old tags of example documentation. This would mean that users have to read through random old documentation to discover why their packaged version doesn't work . Suggesting that clarity in the examples is preferable. Recall that renaming this doesn't give the user some easy exception. It just mean that the trigger isn't satisfied, so there are A LOT of options for debugging. (which takes a lot of time to do, so that's why this information is important) --- docs/Hook-Examples.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/Hook-Examples.md b/docs/Hook-Examples.md index 36e4ddc..2b8af74 100644 --- a/docs/Hook-Examples.md +++ b/docs/Hook-Examples.md @@ -23,6 +23,9 @@ although the examples on this page all use the JSON format. * [Pass string arguments to command](#pass-string-arguments-to-command) ## Incoming Github webhook + +This example works on 2.8+ versions of Webhook - if you are on a previous series, change `payload-hmac-sha1` to `payload-hash-sha1`. + ```json [ { From 4f00a26293fa0a436f849b9c1d078a55d3fb71d2 Mon Sep 17 00:00:00 2001 From: Ankit_Susne <50927105+Anksus@users.noreply.github.com> Date: Sat, 25 Sep 2021 22:56:38 +0530 Subject: [PATCH 2/6] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index af3a1f2..7652948 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ Check out [Hook examples page](docs/Hook-Examples.md) for more complex examples - [XiaoMi Vacuum + Amazon Button = Dash Cleaning](https://www.instructables.com/id/XiaoMi-Vacuum-Amazon-Button-Dash-Cleaning/) by [c0mmensal](https://www.instructables.com/member/c0mmensal/) - [Set up Automated Deployments From Github With Webhook](https://maximorlov.com/automated-deployments-from-github-with-webhook/) by [Maxim Orlov](https://twitter.com/_maximization) - VIDEO: [Gitlab CI/CD configuration using Docker and adnanh/webhook to deploy on VPS - Tutorial #1](https://www.youtube.com/watch?v=Qhn-lXjyrZA&feature=youtu.be) by [Yes! Let's Learn Software Engineering](https://www.youtube.com/channel/UCH4XJf2BZ_52fbf8fOBMF3w) + - [Integrate automatic deployment in 20 minutes using webhooks + Nginx setup](https://anksus.me/blog/integrate-automatic-deployment-in-20-minutes-using-webhooks) by [Anksus](https://github.com/Anksus) - ... - Want to add your own? Open an Issue or create a PR :-) From 75f406845f57cb7f42d8e79584db2e512f58550f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Hajdarevi=C4=87?= Date: Mon, 11 Oct 2021 12:47:23 +0200 Subject: [PATCH 3/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7652948..c9a7673 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ If you don't have time to waste configuring, hosting, debugging and maintaining # -hookdeck If you need a way of inspecting, monitoring and replaying webhooks without the back and forth troubleshooting, [give Hookdeck a try!](https://www.hookdeck.io/?ref=adnanh-webhook) +hookdeck If you need a way of inspecting, monitoring and replaying webhooks without the back and forth troubleshooting, [give Hookdeck a try!](https://www.hookdeck.com/?ref=adnanh-webhook) # Getting started ## Installation From 5189c6265158716efff4cfcb45031136b8be86b0 Mon Sep 17 00:00:00 2001 From: Prince Mendiratta Date: Wed, 29 Dec 2021 16:51:20 +0530 Subject: [PATCH 4/6] Fix broken link for guide to Jira and webhook integration Signed-off-by: Prince Mendiratta --- README.md | 2 +- docs/Hook-Examples.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9a7673..acd45a1 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ Check out [Hook examples page](docs/Hook-Examples.md) for more complex examples ### Guides featuring webhook - [Plex 2 Telegram](https://gitlab.com/-/snippets/1972594) by [@psyhomb](https://github.com/psyhomb) - - [Webhook & JIRA](https://sites.google.com/site/mrxpalmeiras/notes/jira-webhooks) by [@perfecto25](https://github.com/perfecto25) + - [Webhook & JIRA](https://sites.google.com/site/mrxpalmeiras/more/jira-webhooks) by [@perfecto25](https://github.com/perfecto25) - [Trigger Ansible AWX job runs on SCM (e.g. git) commit](http://jpmens.net/2017/10/23/trigger-awx-job-runs-on-scm-commit/) by [@jpmens](http://mens.de/) - [Deploy using GitHub webhooks](https://davidauthier.wearemd.com/blog/deploy-using-github-webhooks.html) by [@awea](https://davidauthier.wearemd.com) - [Setting up Automatic Deployment and Builds Using Webhooks](https://willbrowning.me/setting-up-automatic-deployment-and-builds-using-webhooks/) by [Will Browning](https://willbrowning.me/about/) diff --git a/docs/Hook-Examples.md b/docs/Hook-Examples.md index 2b8af74..1aefe8a 100644 --- a/docs/Hook-Examples.md +++ b/docs/Hook-Examples.md @@ -312,7 +312,7 @@ __Not recommended in production due to low security__ ``` ## JIRA Webhooks -[Guide by @perfecto25](https://sites.google.com/site/mrxpalmeiras/notes/jira-webhooks) +[Guide by @perfecto25](https://sites.google.com/site/mrxpalmeiras/more/jira-webhooks) ## Pass File-to-command sample From c7f7163aaa8aec87c32790baadfaf4f6a0fe5049 Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Mon, 14 Feb 2022 08:24:38 +0000 Subject: [PATCH 5/6] Update Bitbucket example to reference Atlassian's outgoing IP subnets (#578) * Update Bitbucket example to check all of Atlassian's outgoing IP ranges Co-authored-by: Marek Isalski --- docs/Hook-Examples.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/Hook-Examples.md b/docs/Hook-Examples.md index 1aefe8a..05f9a23 100644 --- a/docs/Hook-Examples.md +++ b/docs/Hook-Examples.md @@ -83,7 +83,7 @@ This example works on 2.8+ versions of Webhook - if you are on a previous series ## Incoming Bitbucket webhook -Bitbucket does not pass any secrets back to the webhook. [Per their documentation](https://confluence.atlassian.com/bitbucket/manage-webhooks-735643732.html#Managewebhooks-trigger_webhookTriggeringwebhooks), in order to verify that the webhook came from Bitbucket you must whitelist the IP range `104.192.143.0/24`: +Bitbucket does not pass any secrets back to the webhook. [Per their documentation](https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/#Outgoing-Connections), in order to verify that the webhook came from Bitbucket you must whitelist a set of IP ranges: ```json [ @@ -100,11 +100,23 @@ Bitbucket does not pass any secrets back to the webhook. [Per their documentati ], "trigger-rule": { - "match": - { - "type": "ip-whitelist", - "ip-range": "104.192.143.0/24" - } + "or": + [ + { "match": { "type": "ip-whitelist", "ip-range": "13.52.5.96/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "13.236.8.224/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "18.136.214.96/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "18.184.99.224/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "18.234.32.224/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "18.246.31.224/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "52.215.192.224/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "104.192.137.240/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "104.192.138.240/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "104.192.140.240/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "104.192.142.240/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "104.192.143.240/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "185.166.143.240/28" } }, + { "match": { "type": "ip-whitelist", "ip-range": "185.166.142.240/28" } } + ] } } ] From 0c0bf0b244660a766773b50dd6dbae1ff7a5eb0f Mon Sep 17 00:00:00 2001 From: Arran Date: Mon, 21 Feb 2022 13:15:17 +0100 Subject: [PATCH 6/6] Add Gitea and Uberspace Guide (#579) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index acd45a1..1e16bb3 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,7 @@ Check out [Hook examples page](docs/Hook-Examples.md) for more complex examples - [Set up Automated Deployments From Github With Webhook](https://maximorlov.com/automated-deployments-from-github-with-webhook/) by [Maxim Orlov](https://twitter.com/_maximization) - VIDEO: [Gitlab CI/CD configuration using Docker and adnanh/webhook to deploy on VPS - Tutorial #1](https://www.youtube.com/watch?v=Qhn-lXjyrZA&feature=youtu.be) by [Yes! Let's Learn Software Engineering](https://www.youtube.com/channel/UCH4XJf2BZ_52fbf8fOBMF3w) - [Integrate automatic deployment in 20 minutes using webhooks + Nginx setup](https://anksus.me/blog/integrate-automatic-deployment-in-20-minutes-using-webhooks) by [Anksus](https://github.com/Anksus) + - [Automatically redeploy your static blog with Gitea, Uberspace & Webhook](https://by.arran.nz/posts/code/webhook-deploy/) by [Arran](https://arran.nz) - ... - Want to add your own? Open an Issue or create a PR :-)