-
Notifications
You must be signed in to change notification settings - Fork 480
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
Generic message aggregation #1201
Conversation
…roups:, not messages:
* MessageGroup#<< now performs insertion-sort * MessageAggregator's aggregation has a semi-decent test
This is the replacement for generate_comment and generate_inline_comment for MessageGroup-based PR updates
sorry for letting this fall behind and sit so long - I'll ensure it's up-to-snuff and all conflicts resolved in the coming days once the more urgent #1208 is done. Still not had any problems with it at work! |
👍 no worries, I've also not taken the time to review it too. Not on you |
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.
Cool - yep looks good. Remove the "TODO: test this" and I'll get this shipped
# file_b: | ||
# 1: [error, warning] | ||
# 2: [message] | ||
# 3: [error] |
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 explanation
Generated by :no_entry_sign: [Danger](https://danger.systems/ "generated_by_#{danger_id}") | ||
COMMENT | ||
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.
agreed, it is a stunner
expect(subject).to eq <<~COMMENT | ||
Generated by :no_entry_sign: [Danger](https://danger.systems/ "generated_by_#{danger_id}") | ||
COMMENT | ||
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.
Is there value in this?
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.
I guess I can't see a way in which this could happen - but better to not crash if that somehow does 👍
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.
I may have been getting carried away. I think the idea was "If we write a test with what currently happens, at least we'll know if it ever changes"
end | ||
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.
heh, this file is cute
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.
Maybe generating the contexts with a loop would've been more concise and perhaps more inviting for newcomers. I may have to fall slightly out of love with include_context and it_behaves_like!
I can edit that TODO when I make the semver changes |
This is the hotly-anticipated (by me) follow-up to my previous PR, #1186. Closes #1183 (does that macro thing in github still work?)
I've implemented the whole chain necessary to get multiple messages into a single comment on the PR and wrote a bunch of tests. At the moment only bitbucket cloud can use the new message aggregation stuff but I'll be adding it to the other request sources eventually (probably bitbucket server, then gitlab first, then github... I think I'll leave bitrise and any other funky ones to people who care more / have access to them)
Dogfooded it at work too - it works nicely :)