Skip to content

Commit

Permalink
Feature/add additional hook locations (#3130)
Browse files Browse the repository at this point in the history
* Add hooks for pre/post create/delete branch/tag


Co-authored-by: Nir Ozery <nir.ozery@treeverse.com>
Co-authored-by: Barak Amar <barak.amar@treeverse.io>
  • Loading branch information
3 people authored Mar 31, 2022
1 parent 71ec1e5 commit 476f6f2
Show file tree
Hide file tree
Showing 22 changed files with 1,302 additions and 145 deletions.
12 changes: 12 additions & 0 deletions nessie/action_files/action_post_commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Test Post Commit
description: a test action description
on:
post-commit:
branches:
- feature-*
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for post-commit works
properties:
url: "{{.URL}}/post-commit"
12 changes: 12 additions & 0 deletions nessie/action_files/action_post_create_branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Test Post Create Branch
description: a test action description
on:
post-create-branch:
branches:
- test_branch_delete
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for post-create branch works
properties:
url: "{{.URL}}/post-create-branch"
10 changes: 10 additions & 0 deletions nessie/action_files/action_post_create_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Test Post Create Tag
description: a test action description
on:
post-create-tag:
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for post-create tag works
properties:
url: "{{.URL}}/post-create-tag"
11 changes: 11 additions & 0 deletions nessie/action_files/action_post_delete_branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Test Post Delete Branch
description: a test action description
on:
post-delete-branch:
branches:
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for post-delete branch works
properties:
url: "{{.URL}}/post-delete-branch"
10 changes: 10 additions & 0 deletions nessie/action_files/action_post_delete_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Test Post Delete Tag
description: a test action description
on:
post-delete-tag:
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for post-delete tag works
properties:
url: "{{.URL}}/post-delete-tag"
12 changes: 12 additions & 0 deletions nessie/action_files/action_post_merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Test Post Merge
description: a test action description
on:
post-merge:
branches:
- main
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for post-merge works
properties:
url: "{{.URL}}/post-merge"
12 changes: 12 additions & 0 deletions nessie/action_files/action_pre_commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Test Pre Commit
description: a test action description
on:
pre-commit:
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for pre-commit works
properties:
url: "{{.URL}}/pre-commit"
query_params:
check_env_vars: "{{"{{ ENV.ACTIONS_VAR }}"}}"
12 changes: 12 additions & 0 deletions nessie/action_files/action_pre_create_branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Test Pre Create Branch
description: a test action description
on:
pre-create-branch:
branches:
- test_branch_delete
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for pre-create branch works
properties:
url: "{{.URL}}/pre-create-branch"
10 changes: 10 additions & 0 deletions nessie/action_files/action_pre_create_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Test Pre Create Tag
description: a test action description
on:
pre-create-tag:
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for pre-create tag works
properties:
url: "{{.URL}}/pre-create-tag"
11 changes: 11 additions & 0 deletions nessie/action_files/action_pre_delete_branch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Test Pre Delete Branch
description: a test action description
on:
pre-delete-branch:
branches:
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for pre-delete branch works
properties:
url: "{{.URL}}/pre-delete-branch"
10 changes: 10 additions & 0 deletions nessie/action_files/action_pre_delete_tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Test Pre Delete Tag
description: a test action description
on:
pre-delete-tag:
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for pre-delete tag works
properties:
url: "{{.URL}}/pre-delete-tag"
12 changes: 12 additions & 0 deletions nessie/action_files/action_pre_merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Test Pre Merge
description: a test action description
on:
pre-merge:
branches:
- main
hooks:
- id: test_webhook
type: webhook
description: Check webhooks for pre-merge works
properties:
url: "{{.URL}}/pre-merge"
Loading

0 comments on commit 476f6f2

Please sign in to comment.