Automatically assign Task numbers to newly created Asana cards (eg. FR-1)
Note: You will need an Asana Premium account to use these features. Asana Basic does not have access to custom fields and tasks search ๐ค
When a pull request is opened on GitHub, automatically update all associated Asana card's status to 'Review', and add the PR information to it.
When a pull request is closed and merged on GitHub, automatically update all associated Asana card's status to 'Staging' or 'Production' depending on which branch it is merged into, and add the PR information to it.
- Add the following variables into a .env file in the root folder of this app:
BASE_URL=https://featureready.herokuapp.com
PRODUCTION_BRANCH_NAME=master
STAGING_BRANCH_NAME=develop
GITHUB_PATOKEN=GGGG
GITHUB_OWNER_NAME=yoongfook
GITHUB_REPO_NAME=featureready
GITHUB_WEBHOOK_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxx
ASANA_PATOKEN=0/9cccccccccccccccccccccccccccc
ASANA_WORKSPACE_ID=111122222223333333
ASANA_PROJECT_ID=1111222224444444
ASANA_PROJECT_PREFIX=FR
ASANA_CUSTOM_FIELD_NAME=Stage
-
Run
npm run setup-custom-fields
to setup all the required custom-fields on your Asana project (Asana Premium required) -
Run
npm run setup-asana-hooks
to setup all required hooks when creating a task etc -
Run
npm run setup-github-hooks
to setup all required GitHub hooks when adding a commit, creating pull requests, etc -
Run
npm run dev
to start the server locally
- Clone this repo to your local machine
- Create a new Heroku app
- Push this repo to your newly created Heroku app (take note of the app's URL eg. https://featureready.herokuapp.com)
- Add the config vars above to your app's Heroku dashboard > Settings, adding the URL from #3 to BASE_URL
- Run
heroku run npm run setup-tags
- Run
heroku run npm run setup-hooks
npm list-hooks
- lists all hooks on Asana