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

Action doesn't fail if Asana task isn't in a project where the GitHub Action is allowed to run in

Open psypuff opened this issue 2 years ago • 1 comments

We were under the impression the action should fail if the attachment fails for any reason. This is a blocker for us since we need to prevent PR merges if it's not attached to an Asana task. In some cases we get the following response but it returns with a 200 status so the action passes and let the PR merge although it wasn't really attached to an Asana task:

[
  {
    task: '...',
    result: 'GitHub Widget attachment/comment failed because the task is not in a project where the GitHub Action is allowed to run in. Please add any of the project IDs [...] to allowed projects list in the GitHub Action configuration file or add the task to an allowed project.'
  }
]

This could be controlled by some strict variable if there's a need to support current behavior. Another option could be exposing the response as an output for further steps to fail the whole workflow like suggested here.

psypuff avatar Aug 02 '23 10:08 psypuff

Another similar issue this could alleviate - the action doesn't fail even if there's no Asana link in the PR description which kinda beats the whole purpose of that action (assuming one would like to enforce its existence).

psypuff avatar Aug 02 '23 13:08 psypuff