Skip to content

Commit ba5e1cc

Browse files
author
Julian Dehm
committed
add github actions to sync with asana
- sync issues to asana - link PRs to tasks (if a task is specified in the PR description) - add comment to task if PR was approved - add comment to task if PR was merged (optional: mark task as completed)
1 parent 86a902e commit ba5e1cc

6 files changed

+79
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
pull_request:
3+
types: [opened, reopened]
4+
5+
jobs:
6+
sync:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Add comment in Asana task
10+
uses: duckduckgo/[email protected]
11+
with:
12+
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
13+
trigger-phrase: 'STORY:'
14+
action: 'add-asana-comment'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Pull Request Reviewed
2+
3+
on:
4+
pull_request_review:
5+
types: [submitted]
6+
7+
jobs:
8+
pr-reviewed:
9+
if: github.event.review.state == 'approved'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Update Asana task -> PR approved
13+
uses: duckduckgo/[email protected]
14+
with:
15+
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
16+
trigger-phrase: "STORY:"
17+
action: 'notify-pr-approved'
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on:
2+
pull_request:
3+
types: [closed]
4+
5+
jobs:
6+
add-pr-merged-comment:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: duckduckgo/[email protected]
10+
if: github.event.pull_request.merged
11+
with:
12+
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
13+
trigger-phrase: 'STORY:'
14+
action: 'notify-pr-merged'
15+
is-complete: false
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
on:
2+
issues:
3+
types: [opened, reopened]
4+
5+
jobs:
6+
sync:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: duckduckgo/[email protected]
10+
with:
11+
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
12+
asana-project: ${{ vars.GH_ASANA_PROJECT_ID }}
13+
action: 'create-asana-issue-task'
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
on:
2+
issues:
3+
types: [opened, reopened]
4+
5+
jobs:
6+
sync:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: duckduckgo/[email protected]
10+
with:
11+
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
12+
asana-project: ${{ vars.GH_ASANA_PROJECT_ID }}
13+
action: 'create-asana-issue-task'

changelog/_1113.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
### Added
2+
3+
- add github workflow to
4+
- sync issues to asana
5+
- link PRs to tasks (if a task is specified in the PR description)
6+
- add comment to task if PR was approved
7+
- add comment to task if PR was merged (optional: mark task as completed)

0 commit comments

Comments
 (0)