github-actions-automate-projects
github-actions-automate-projects copied to clipboard
Add catch for error on adding to project it's already associated with.
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]
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?
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.
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.
Thank you for your patch and Sooooooooooooooooooooooooooooooooooooooooory for my late reply. I'll check if I can merge this PR from now 📝