Pergunta

I want to make a git hook that will automatically comment on an open issue in asana when someone makes a commit with a specially-formatted message. Something along the lines of:

asana task-id: Fix whatever

The main problem I'm having is I don't know an easy way of getting the task-id. The ids are quite long and the only place I see them being displayed in the user interface is in the URL when you click a task. This is a bit cumbersome and error prone when trying to copy it, and isn't obvious to the user.

Is there an easier way to comment on a task from a shell script (or git hook)?

Foi útil?

Solução

Well, regardless of how you do it you'd definitely need the task ID (as you pointed out, it's in the URL). What we actually do internally is just paste a link to an Asana task - it contains the ID, identified it as an asana task, and is clickable in many views so you can jump right to the task it's talking about when viewing commit history. Very handy!

We then have what is essentially a commit hook look for https://app.asana.com/..., grab the task ID and post a new comment linking to the commit in our source control and the commit message.

Using URLs means the link goes both ways, which is incredibly convenient.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top