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 debug messages for "createLabel" and "addLabels" failures in "createOrAddLabel" #1017

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

sogame
Copy link
Contributor

@sogame sogame commented Mar 16, 2020

When using createOrAddLabel sometimes I'm getting a failure:

RequestError [HttpError]: Validation Failed: {"resource":"Label","code":"already_exists","field":"name"}

Indeed the label already exists, and looking at the code for createOrAddLabel I think this could only happen if api.issues.listLabelsForRepo throws an exception.

I think it would be useful to add try/catch statements and debug messages when calling api.issues.createLabel and api.issues.addLabels to get more information and avoid Danger failing when these requests fail (same as done for api.issues.listLabelsForRepo).

@sogame
Copy link
Contributor Author

sogame commented Mar 16, 2020

Build is failing, but looks like it was failing in a previous pr: #1013

@orta
Copy link
Member

orta commented Mar 17, 2020

This seems very reasonable to me 👍

@orta orta merged commit e6c7436 into danger:master Mar 17, 2020
@rohit-gohri
Copy link
Member

Build is failing, but looks like it was failing in a previous pr: #1013

Deleted Travis cache and restarted master build, it passed now.

@sogame
Copy link
Contributor Author

sogame commented Mar 19, 2020

Hi @orta, I know this is a tiny change, but would it be possible to publish a new release of Danger JS? 😇

@peril-staging
Copy link
Contributor

peril-staging bot commented Mar 19, 2020

Thanks for the PR @sogame.

This PR has been shipped in v9.4.0 - CHANGELOG.

@orta
Copy link
Member

orta commented Mar 19, 2020

Yeah, it didn't look the others were coming anytime too soon

@sogame
Copy link
Contributor Author

sogame commented Mar 20, 2020

Thanks a lot @orta 🙇

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.

None yet

3 participants