This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.73 KB
/
asana.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
on:
pull_request:
branches:
- master
types:
- opened
- closed
jobs:
update_task_on_pr_open:
if: |
github.repository_owner == 'panther-labs' &&
github.event.pull_request.state == 'open'
runs-on: ubuntu-latest
steps:
- uses: panther-labs/github-asana-action@v3.0.5
name: Adds a comment to the related Asana task whenever a PR has been opened
with:
asana-pat: ${{ secrets.ASANA_PAT }}
action: 'add-comment'
text: ${{ format('A Pull Request has been opened {0}', github.event.pull_request.html_url) }}
is-pinned: true
- uses: panther-labs/github-asana-action@v3.0.5
name: Moves the Asana task to "In Review" when the PR is opened
with:
asana-pat: ${{ secrets.ASANA_PAT }}
action: 'move-section'
targets: '[{"projectNameRegex": "(S|s)print", "section": "In Review"}]'
update_task_on_pr_close:
if: |
github.repository_owner == 'panther-labs' &&
github.event.pull_request.state == 'closed'
runs-on: ubuntu-latest
steps:
- uses: panther-labs/github-asana-action@v3.0.5
name: Adds a comment to the related Asana task when the PR is closed
with:
asana-pat: ${{ secrets.ASANA_PAT }}
action: 'add-comment'
text: ${{ format('A Pull Request is now closed {0}', github.event.pull_request.html_url) }}
- uses: panther-labs/github-asana-action@v3.0.5
name: Closes the related Asana tasks when the PR gets merged
if: github.event.pull_request.merged
with:
asana-pat: ${{ secrets.ASANA_PAT }}
action: 'complete-task'
trigger-phrase-regex: '(C|c)loses'
is-complete: true