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

Explicitly check for Array of previous comments #586

Merged
merged 2 commits into from
May 2, 2018

Conversation

mxstbr
Copy link
Member

@mxstbr mxstbr commented May 2, 2018

Closes #577

@sunshinejr
Copy link
Member

Oh, I think I found the underlying issue. previousComments are fetched using the URL:

https://api.github.com/repos/${repo}/pulls/${prID}/comments

And because this is an issue, not a PR, it is trying to get inline comments for non-existing PR:

https://api.github.com/repos/withspectrum/spectrum/pulls/2994/comments

And there is an error response from the GitHub API instead of an empty array.

@mxstbr
Copy link
Member Author

mxstbr commented May 2, 2018

Whaaat! A proper PR would be much appreciated 🙏

@sunshinejr
Copy link
Member

Oh, this PR is good I think. The "proper" fix might be to check if this is a PR/issue and use inline comments based on that. I don't know if it's possible to do currently, though.

@orta
Copy link
Member

orta commented May 2, 2018

OK, this seems fine for me right now 👍

@orta orta merged commit d3287ed into danger:master May 2, 2018
@mxstbr mxstbr deleted the fix-previous-comments-error-again branch May 2, 2018 19:26
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