Skip to content

Commit 64d9c95

Browse files
authored
Merge pull request #88 from OneSignal/zapier-action
Close asana tasks generated from Github issues
2 parents 9945fd5 + cc41ec6 commit 64d9c95

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/Zapier.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This is an action to close asana tasks that were generated by Github issues
2+
3+
name: Zapier web hook
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the "main" branch
8+
issues:
9+
types: [closed]
10+
11+
permissions:
12+
issues: read
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
# This workflow contains a single job called "build"
17+
build:
18+
# The type of runner that the job will run on
19+
runs-on: ubuntu-latest
20+
21+
# Steps represent a sequence of tasks that will be executed as part of the job
22+
steps:
23+
# Runs a set of commands using the runners shell
24+
- name: Call Zapier web hook to close Asana task
25+
if: ${{ !github.event.issue.pull_request }}
26+
env:
27+
ISSUE_TITLE: ${{ github.event.issue.title }}
28+
run: |
29+
curl --location --request POST 'https://hooks.zapier.com/hooks/catch/12728683/b7009qc/' \
30+
--header 'Content-Type: application/json' \
31+
--header 'Accept: application/json' \
32+
--data-raw '{
33+
"task_name" : "$ISSUE_TITLE"
34+
}'

0 commit comments

Comments
 (0)