Giter Site home page Giter Site logo

asana-github-pr-webhook's Introduction

Outdated! Please use the github app that is now supported for business asana accounts.

Asana Github PR Webhook

CircleCI JavaScript Style Guide codecov

Connects Github and Asana when you put an Asana ID at the beginning of a PR title.

Usage

Use the last 4 digits of an Asana task ID at the beginning of a PR name or at the beginning of the description.

See a link to the PR appear as a comment on that task in Asana.

See a link to the Asana task appear as a comment on the PR.

Installation

1. Get an Asana access token

  • To get an access token go to 'My Profile Settings' -> Apps -> 'Manage Developer Apps' -> 'Create new personal access token'.
  • Make a note of the access token as you'll need it later on. <asana access token>

2. Get your Asana workspace id

  • Make sure you're logged in to asana and go to https://app.asana.com/api/1.0/workspaces
  • Make a note of the gid as you'll need it later on. <workspace id>

3. Get an Github access token

  • To get an access token go to 'Settings' -> 'Developer Settings' -> 'Personal Access Token' -> 'Generate new token'.
  • Under 'scopes' select 'Repo'.
  • Make a note of the access token as you'll need it later on. <github access token>

4. Deploy the application

This project uses Zeit Now to deploy, which requires only a github account and gives you 2 million free invocations a month.

  • Create a long, random password that we'll refer to as <webhook secret>
  • Fork this repo and download it.
  • Change the now.json config to choose a different alias as you won't be able to use the default. We'll refer to this URL as <url>
  • Run npm init
  • Run
    now \
      -e WEBHOOK_SECRET="<webhook secret>" \
      -e ASANA_ACCESS_TOKEN="<asana access token from step 1>"\
      -e WORKSPACE_ID="<workspace id from step 2>"\
      -e GITHUB_ACCESS_TOKEN="<github access token from step 3>"
  • Run now alias to set the non-changing URL that we can use in step 5.

5. Setup webhooks in Github

  • For the github project you want to integrate, go to settings -> webhooks -> add a new webhook.
  • Set the Payload URL to https://<url from step 3>/webhook.js
  • Set the content type to application/json
  • Set the secret to <webhook secret>
  • Set the events to 'Let me select individual events' and check the box next to 'Pull Requests'
  • Save.

Everything should work.

asana-github-pr-webhook's People

Contributors

codeallthethingz avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

asana-github-pr-webhook's Issues

Stale `now` documentation

Issue Description

It looks like #35 deprecated the now.json file in favor of a vercel.json file. This change has caused the "Deploy the application" documentation in the README to become stale; specifically, the content around updating now.json and running > now \ .....

I attempted forking and trying to npm install vercel, but couldn't really figure it out (typical python dev, right ๐Ÿ˜‰). Anyway - I thought I'd let you know about the issue b/c it probably feels like a quick patch on your end.

Thanks for the library; I'm really hoping our team can use it!

We couldn't deliver this payload: timed out

Hey I would love to use this integration, how can I troubleshoot a timeout error?

Issue

Following the steps, I get the following behavior:
โœ… "worked" if I don't specify last 4 digits of an asana task
โŒ Timeout error if I specify 4 digits

Screenshot

Github

Timed Out

Vercel (Zeit)

Screen Shot 2020-09-29 at 12 32 53 PM

Does not seem to able to interface with asana

I followed the instructions, was very easy.
Github shows that the webhook is being called, and it returned it worked in the body of the response, but nothing is posted to asana and the Pr doesnt get updated with asana details

README refers to wrong step numbers

Run now alias to set the non-changing URL that we can use in step 4.

  1. Setup webhooks in Github
    For the github project you want to integrate, go to settings -> webhooks -> add a new webhook.
    Set the Payload URL to https://<url from step 3>/webhook.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.