Skip to content

Commit

Permalink
add github actions to sync with asana
Browse files Browse the repository at this point in the history
 - 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)
  • Loading branch information
goapunk committed Oct 16, 2024
1 parent 86a902e commit 4f3cf0d
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/asana-link-pr-to-task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
pull_request:
types: [opened, reopened]

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Add comment in Asana task
uses: duckduckgo/[email protected]
with:
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
trigger-phrase: 'STORY:'
action: 'add-asana-comment'
17 changes: 17 additions & 0 deletions .github/workflows/asana-notify-approved.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Pull Request Reviewed

on:
pull_request_review:
types: [submitted]

jobs:
pr-reviewed:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- name: Update Asana task -> PR approved
uses: duckduckgo/[email protected]
with:
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
trigger-phrase: "STORY:"
action: 'notify-pr-approved'
15 changes: 15 additions & 0 deletions .github/workflows/asana-notify-merged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
on:
pull_request:
types: [closed]

jobs:
add-pr-merged-comment:
runs-on: ubuntu-latest
steps:
- uses: duckduckgo/[email protected]
if: github.event.pull_request.merged
with:
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
trigger-phrase: 'STORY:'
action: 'notify-pr-merged'
is-complete: false
13 changes: 13 additions & 0 deletions .github/workflows/asana-sync-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
issues:
types: [opened, reopened]

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: duckduckgo/[email protected]
with:
asana-pat: ${{ secrets.GH_ASANA_SECRET }}
asana-project: ${{ vars.GH_ASANA_PROJECT_ID }}
action: 'create-asana-issue-task'
7 changes: 7 additions & 0 deletions changelog/_1113.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Added

- add github workflow to
- 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)

0 comments on commit 4f3cf0d

Please sign in to comment.