Lombiq / GitHub-Actions

Reusable GitHub Actions workflows and actions used in Lombiq project, mostly with Orchard Core.
BSD 3-Clause "New" or "Revised" License
4 stars 9 forks source link

Don't fail Jira resolve/Done transition if it already happened (OSOE-489) #130

Open Piedone opened 1 year ago

Piedone commented 1 year ago

When using post-pull-request-checks-automation, if you have multiple pull requests for a Jira issue, the one completing first will transition it, making the other one fail with something like:

Please specify transition name or transition id.
Possible transitions:
{ id: 201, name: Reopen } transitions issue to 'To Do' status.
Failed to transition issue.

See e.g. here. The step should not fail in such cases, and just do nothing if the issue is already in the target state.

Jira issue

Piedone commented 11 months ago

The available transitions can be fetched via https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-get.

Piedone commented 11 months ago

Will do as part of https://github.com/Lombiq/GitHub-Actions/issues/277.