Skip to content

mattkinnersley/github-asana-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

GitHub Asana Integration Action

When used with the pull_request trigger, the PR URL will be commented on the Asana Task. The Asana Task URL will also be commented on the PR.

To get this to work, the branch must be named in the following way: <name-of-feature>/<asana-task-id>

Create an action from this template

To use this action you must provide two tokens:

  • Asana Token
    • This can be found in the user settings of your Asana account. It is recommended that a new Asana User is created as this is the user that will be used to comment on tasks.
  • GitHub Token
    • This is automatically registered as an environment variable in every GitHub workflow, this is accessed with: ${{ secrets.GITHUB_TOKEN }}

See below for an example:

with:
  asana-token: ${{ secrets.ASANA_ACCESS_TOKEN }}
  github-token: ${{ secrets.GITHUB_TOKEN }}

Usage

You can now consume the action by referencing the v1 branch

name: Asana
on:
  pull_request:
    types: [opened]
    branches:
      - main

jobs:
  asana-sync:
    runs-on: ubuntu-latest
    name: Sync GitHub PR with Asana Task
    steps:
      - name: Asana
        id: asana
        uses: kinnersleym/github-asana-action@v1
        with:
          asana-token: ${{ secrets.ASANA_ACCESS_TOKEN }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Get Asana Task URL
        run: echo ${{ steps.asana.outputs.asana-task }}}

About

An action that integrates Asana with Github. End your branch name with the task ID and it will comment on the task with the PR link and comment the Asana task link on the PR.

Resources

License

Stars

Watchers

Forks

Contributors

Generated from actions/javascript-action