Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmertic
Copy link

@jmertic jmertic commented Oct 24, 2020

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]

@takanabe
Copy link
Owner

Hi @jmertic! Thank you for your PR.

this must be solved with #26. could you check?

@jmertic
Copy link
Author

jmertic commented Mar 29, 2021

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.

@awesomeunleashed
Copy link

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.

@takanabe
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants