github-actions-automate-projects icon indicating copy to clipboard operation
github-actions-automate-projects copied to clipboard

Add catch for error on adding to project it's already associated with.

Open jmertic opened this issue 4 years ago • 4 comments

An issue I've ran into is that the job will run on against issue updates/adds when it's already associated with the given project. In those cases, this error is thrown...

Error: /21 17:30:36 [ERROR] POST https://api.github.com/projects/columns/11063427/cards: 422 Validation Failed [{Resource:ProjectCard Field:data Code:unprocessable Message:Project already has the associated issue}]
Failed to get results from GitHub

Added a check for this message which will just add a note to the info log but not throw an error.

Signed-off-by: John Mertic [email protected]

jmertic avatar Oct 24 '20 13:10 jmertic

Hi @jmertic! Thank you for your PR.

this must be solved with https://github.com/takanabe/github-actions-automate-projects/pull/26. could you check?

takanabe avatar Mar 27 '21 06:03 takanabe

Hi @takanabe!

My Go coding skills aren't amazing, but it would appear that #26 is broadly looking for any project cards for an issue, where mine is specifically looking at the error of trying to add a project card on an issue already with one. Not sure if that captures the same use case.

jmertic avatar Mar 29 '21 11:03 jmertic

Any chance this could be merged? It would be nice to not get an error if I forget there's automation and assign the project manually.

awesomeunleashed avatar Feb 24 '22 21:02 awesomeunleashed

Thank you for your patch and Sooooooooooooooooooooooooooooooooooooooooory for my late reply. I'll check if I can merge this PR from now 📝

takanabe avatar Mar 22 '22 11:03 takanabe