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
GitHub pull request review #702
GitHub pull request review #702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks 👍 to me. I'm fine without doing line/file comments at first, as long as we document it as such
end | ||
|
||
# @orta @JuanitoFatas to be discussed whether we should submit review with | ||
# the same status as already submitted by danger before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on an PR update? I think that's 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 5730d68
post "#{Repository.path repo}/pulls/#{pull_request_number}/reviews/#{review_id}/events", options.merge(review) | ||
end | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one
# @!group PR Review | ||
# Current PR Review object. | ||
# @return [GitHubReview] | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need considerable documentation before we ship ( as this is what an end user would see on the website ) - I'm happy to do this once you're ready though 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, do you think we should provide an example here or what are your thoughts? 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing, something like this
# @!group PR Review
#
# In Beta. Provides access to creating a GitHub Review instead of a typical GitHub comment.
#
# To use you announce the start of your review, and the end via the `start` and `submit` functions,
# for example:
#
# ```
# github.review.start
# github.review.fail("Please add a CHANGELOG entry") if has_no_changelog
# github.review.warn("Highway to the Danger Zone") if pr_includes_word_danger
# github.review.message("You might want to read #{url}") if may_require_docs
# github.review.submit
# ```
#
# @return [GitHubReview]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People don't see the inline documentation for the review
object, so it needs to be attached to this DSL attribute to end up on the reference - http://danger.systems/reference.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@orta looks cool 👍
The small feedback:
@return [GitHubReview]
->@return [GitHubSource::Review]
or we can just leaveReview
.- Should we mention
github.review.markdown(...)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@return [GitHubReview] -> @return [GitHubSource::Review] or we can just leave Review.
IMO @return Review
is fine, maybe even @return ReviewDSL
as these docs are for end-users who don't care about our internal semantics
Should we mention github.review.markdown(...) ?
Yep :D - please make it a real-ish example like the ones above
class Review | ||
include Danger::Helpers::CommentsHelper | ||
|
||
# @see https://developer.github.com/v3/pulls/reviews/ for all possbile events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possbile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5730d68
799bd80
to
5730d68
Compare
This feels 👍 to me
I think approval without comment is perfectly fine IMO, if this does't feel right, we can change that at a later date. Note you should check if that's possible before making the assumption it is possible.
Fine by me |
Yeah, if a review can be posted with 0 comments, I think it's worth adding instead of the redundant one there |
Yeah, like this one ^ |
Rubocop is not happy 👮 Other than offenses, 👍 Great work! |
@JuanitoFatas yep, I've noticed it, but I'm a bit confused now why it's green on my local machine with the same command. I've also created a test #704 with up to date master and it fails with rubocop as well, really weird. |
I've always wondered if Rubocop actively ignores the fact that you're using bundler with it |
Aha, that could be the case rubocop/rubocop#3968 |
Generated by 🚫 danger |
Yes the latest rubocop release of 0.47.1 was the issue. |
Alright - this looks good to me, lets get this shipped. |
Awesome - shipped as 4.1.0 |
@orta thanks, could you explain why the |
It runs our CI on windows, it's been having issues on all my OSS - might be capacity issues |
Hi, there this PR addresses an issue I opened a while ago #684.
The status is kinda work in progress, but there is already functionality that can be potentially used.
The changes in this PR:
GitHubSource
to combine the only GitHub related features;Review
under theGitHubSource
module, which represents the pull request review object;octokit
which I think will be used until the API is not final and then I will create a PR to octokit itself with extension for pr reviews;Here is an example of how it looks like in
Dangerfile
:You can check how it looks in a PR here
The open points I want to discuss:
P.S. the changelog is not modified yet and I haven't cleaned the commit history yet.