GITHUB ASANA ACTION

Integrate Asana and Github

How to synchronize your development work on Asana via Github Actions

Ayush P Gupta
3 min readApr 13, 2021

The very first article of our Automation series relating to the different automation we picked up in our work journey.

Background

At our workplace FieldAssist, we use Github as Version Control System (VCS), and Asana for task management of different Flutter projects.

We start off our daily development work according to given Asana tasks. Upon completion of code part, every time we need to manually comment its status, which leads to the manual dependency of moving task to different states like In Progress, Testing, etc

This created a lot of difficulties as the team started growing, sometimes we forget to update our tasks with relevant comments, causing confusion and chaos in our day-to-day team scrum.

Solution

Recently I was exploring Github Actions and came to know about Github Action for Asana. This action helps in moving a task to its respective columns upon referencing its link in commit or Pull Request. Basically removing manual dependency for task movement and status change.

This minor introduction helped our Flutter team a lot. This action auto-comment on the Asana task that I have raised Pull Request against certain work.

A sample showing automated comments

Caveats

This didn't fully fulfill our purpose. We wanted to comment about PR merging status also whenever a PR is merged or closed.

Hence I edited the action to support commenting PR merged status, Commit pushed.

Meet TheDotLabs/github-asana-action

This new action helped us to automate our task movement on either commit push or pull requests.

Usage is simple. Just Plug your Asana PAT and you are good to go.

uses: apgapg/github-asana-action@--latest--
with:
asana-token: 'Your PAT'
targets_commit_push: '[{"project": "New MT Flutter App", "section": "Development Done"}, {"project": "Current Sprint", "section": "In Review"}]' //Optional
targets_pr_raise: //Optional
targets_pr_merge: //Optional

Note the comments are hardcoded not provided via templates.

If you want to check out the source code, see:
TheDotLabs/github-asana-action.

Bot User

While developing this feature I came across another problem of not getting notification of these above auto-generated comments. This issue was due to PAT (Personal Access Token) which was mine and because it was me who was commenting (through Github Actions), Asana didn’t post notification in my inbox.

For this problem, I created a Bot user named FA Flutter Bot which clearly specifies the context of who is the author of the comment. Also, this adds a more professional look to our work.

Outcome

Yay! It fulfills our purpose for now. No worries to maintain task status. Just raise PR.
As a Flutter team, We now have the full status of the currently ongoing development work in different Flutter Projects.

After feedbacks and final polishing

Conclusion

The above optimization seems small but is really helpful when you are working in enterprise mode where you have many developers on a project who are responsible for maintaining, developing, and scaling the product.

Whola! Both you and I learnt something new today. Congrats
Clap! Clap! Clap!

Connect with me:
Portfolio: https://apgapg.github.io/
LinkedIn: https://www.linkedin.com/in/ayushpgupta/
Github: https://github.com/apgapg

--

--

Ayush P Gupta

NodeJs | VueJs | Kubernetes | Flutter | Linux | DIY person