This action integrates asana with github.
- Asana account with the permission on the particular project you want to integrate with.
- For creating tasks in Asana, you must provide the Asana project where the issues will be added to.
- For adding PR link to Asana, you must provide the task url in the PR description.
Required Your public access token of asana, you can find it in asana docs.
required The action to be performed. Possible values are
create-asana-issue-task
to create a task based on the Github Issuenotify-pr-approved
to add a comment to the Asana task when the PR has been approvednotify-pr-merged
to complete the Asana task when a PR has been mergedcheck-pr-membership
checks the PR sender membership in the organisation that owns the repoadd-asana-comment
adds a comment to the Asana task with the link to the Pull Requestadd-task-asana-project
adds a task to a project / section in Asanacreate-asana-pr-task
to create a task in Asana based on the Github Pull Requestget-latest-repo-release
to find the latest release version of a Github Repositorycreate-asana-task
to create a task in Asana
When a Github Issue has been added, it will create an Asana task with the Issue title, description and link.
Required The Asana project ID where the new task will be added i.e ASANA PROJECT: https://app.asana.com/0/1174433894299346
on:
issues:
types: [opened, reopened]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: duckduckgo/[email protected]
with:
asana-pat: 'Your PAT'
asana-project: 'Asana Project Id'
action: 'create-asana-issue-task'
When a Pull Request has been reviewed, it will look for an Asana task in the PR description and comment on it.
Required Prefix before the task i.e ASANA TASK: https://app.asana.com/1/2/3/.
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: 'Your PAT'
trigger-phrase: 'Your Trigger Phrase'
action: 'notify-pr-approved'
When a Github Pull Request has been closed, it will look for an Asana task in the PR description and close it.
optional Close the Asana task after Github PR merged when set to true
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: 'Your PAT'
trigger-phrase: 'Your Trigger Phrase'
action: 'notify-pr-merged'
is-complete: true
When a Github Pull Request has been opened, it will check if the sender is a member of the organisation. This is one of the step of a bigger workflow, that process PRs differently depending if it's a community PR or not. Required Prefix before the task i.e ASANA TASK: https://app.asana.com/1/2/3/.
Required Github public access token
on:
pull_request:
types: [opened, reopened]
jobs:
validate-pr:
name: Validate Pull Request
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.step1.outputs.external }}
steps:
- name: Checking Pull Request sender membership
id: step1
uses: duckduckgo/[email protected]
with:
github-pat: 'Your Github PAT'
action: 'check-pr-membership'
For PRs that are opened by members of the organisation, it will look for an Asana task in the PR description and comment on it with the PR link.
Required Prefix before the task i.e ASANA TASK: https://app.asana.com/1/2/3/.
optional Pinned the PR comment when set to true
`` Asana Task: https://app.asana.com/0/1/2
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: 'Your PAT'
trigger-phrase: 'Your Trigger Phrase'
action: 'add-asana-comment'
Adds a task to an Asana project and section. The action will look for an Asana task in the PR description.
Required Prefix before the task i.e ASANA TASK: https://app.asana.com/1/2/3/.
Required Id of the Asana project that the task will be added to. Task will be added to the top of the project.
optional Id of the Asana section in the Asana project. Task will be added to the top of the section.
on:
pull_request:
types: [opened, reopened]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Add Asana task to Project
uses: duckduckgo/[email protected]
with:
trigger-phrase: 'Your Trigger Phrase'
asana-project: 'Asana Project Id'
asana-section: 'Asana Section Id'
action: 'add-task-asana-project'
When a Github Pull Request has been added by a community contributor, it will create an Asana task with the Pull Request title, description and link.
Required The Asana project ID where the new task will be added i.e ASANA PROJECT: https://app.asana.com/0/1174433894299346
on:
issues:
types: [opened, reopened]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Create Asana task in Asana Project
uses: duckduckgo/[email protected]
with:
asana-project: 'Asana Project Id'
action: 'create-asana-pr-task'
Finds the latest release version of a Github Repository.
Required Repository to check for the latest version.
Required Organisation that owns the Repository.
on:
workflow_dispatch:
jobs:
find-latest-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.latest-release.outputs.version }}
steps:
- name: Find latest release of content scope scripts
id: latest-release
uses: duckduckgo/[email protected]
with:
github-pat: 'Your Github PAT'
github-repository: 'Github Repository'
github-org: 'Github Organisation'
action: 'get-latest-repo-release'
Creates an Asana task with the properties defined below.
Required The Asana project ID where the new task will be added i.e ASANA PROJECT: https://app.asana.com/0/1174433894299346
The Asana section ID in the Asana Project
Required Name of the Asana task
Required Description of the Asana task
ID of Asana tag to be added to the task i.e. https://app.asana.com/0/1208613272217946/
on:
issues:
types: [opened, reopened]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Create Asana task in Asana Project
uses: duckduckgo/[email protected]
with:
asana-project: 'Asana Project Id'
asana-section: 'Asana Section Id'
asana-task-name: 'Asana Task Name'
asana-task-description: 'Asana Task Description'
asana-tag: 'Tag Id'
action: 'create-asana-task'