Improve Your Workflow with APIs: Asana & GitHub Edition

We recently made the switch from GitHub Issues to Asana for project management and one of the pains that comes along with that is cross-referencing progress between the two. Whenever a Pull Request related to an Asana Task was opened, we would leave a comment with a link to the Pull Request on the Task letting others (non-devs) know that the code was complete. We would sometimes also list all the Tasks completed in the Pull Request.

I’m not a fan of doing manual work when something could be automated, so I took on the task of optimizing our workflow by creating a GitHub Hook for an app that uses both the Asana and GitHub sweet APIs built with my new favorite Ruby framework, grape.


Let’s say you’re working on some awesome app that’s being managed on Asana and has code hosted on GitHub. You finished two Tasks that you were assigned, how do you communicate this and make the connection between Asana and GitHub? Here’s what what we have:

  • Asana Project: Awesome App
  • GitHub Repo: awesome_app
  • Task #200: Awesome Feature A
  • Task #201: Awesome Feature B

Old Way

Using the old way you would make a Pull Request from your commit saying whatever you want it to say then leave a Comment on the Asana Task, something like:

Implemented in

Then you would add a Comment to the Pull Request with a link to the Tasks like so:

For Asana Tasks Awesome Feature A and Awesome Feature B

Bam. It was tedious, but there’s a connection between them!

New Way

Make references in your commit by mentioning the Task ID in the message (I like to include the Task name in the message as well):

Implemented #200 Awesome Feature A and #201 Awesome Feature B

BAM! That’s it. Now if you look at either Task in Asana, there will be a new Comment:

[GitHub Update]

  • Mentioned by: Marty Trzpit
  • Action: Opened Pull Request #1
  • Pull Request:
  • Commit:…

And in the GitHub Pull Request:

Found Asana Tasks:

But wait, there’s MORE!

Asana also has a Tag feature that allows you to tag a Task with a specific Tag. I used this feature to add a ‘Pull Request’ Tag for Tasks that are part of an open Pull Request and a ‘Merged’ Tag for Tasks that are part of a merged Pull Request to make it easier to see Task status on a list.

What About the Existing Asana Hook?

If you look at the list of GitHub Hooks you’ll notice that there is already an existing Asana Hook. Using our scenario above it leaves a comment on the Task:

Marty Trzpit pushed to branch master of bellycard/awesome_app ( – Implemented #200 Awesome Feature A and #201 Awesome Feature B

Which is good enough in most cases, but I wanted more so I built our own that we can easily expand upon to work with future services, not just GitHub Hooks.

Future & Ideas

There’s still some cleanup that needs to get done before we open source this, but there’s plenty of cool ideas that people have suggested that we look forward to implementing, including:

  • Wouldn’t it be great if we can Tag Tasks as ‘Staging’ or ‘Production’ if they’re been deployed to either a Staging or Production environment?
  • Using verbs to provide more action, such as writing a commit message with closes and reopens to mark Tasks as complete/uncomplete
  • Track feature implementation performance and estimates from Task creation to deployment

I’ll update this post when we open source it, but let me know if you have any ideas for workflow improvements!

Ask a question or share this article, we’d love to hear from you!