create-app-attachment-github-action icon indicating copy to clipboard operation
create-app-attachment-github-action copied to clipboard

How does the plugin detect which task it has to be attached to?

Open christian-hess-94 opened this issue 3 years ago • 2 comments

I'm currently trying to implement the plugin into our Asana board

The main question really is how the github action can correctly attach itself to a certain task without using any kind of ID, or something?

How does it know to attach to a certain task instead of another one? Does it use the title for that or something like that? Or do we have to manually attach it using the "github PR" field inside the task?

christian-hess-94 avatar May 02 '22 15:05 christian-hess-94

Not part of the Asana team so take this with a grain of salt Based on my experience implementing this at my company, the PR description is searched for an asana link and the task ID is parsed from the end of the link.

For example, if the link https://app.asana.com/0/<project_id>/<task_id>/f is included in the PR description, the action will attempt to link the PR to a task with an id matching task_id. Important to note, the integration doesn't currently have the ability to recognize a link to a project (ex. https://app.asana.com/0/<project_id>/list) vs a link to a task (ex. https://app.asana.com/0/<project_id>/<task_id>/f) and in the event a link to a project is included, the action will fail with a "Task not recognized: <project_id>" error.

katelillemoen avatar Jun 02 '22 15:06 katelillemoen

I think it will attempt to attach to every Asana task url it finds in the description. I haven't thoroughly tested this and I don't really understand typescript, but that matches what I've seen.

xiongchiamiov avatar Oct 25 '22 23:10 xiongchiamiov