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

Generic message aggregation #1201

Merged
merged 20 commits into from
Apr 16, 2020
Merged

Conversation

telyn
Copy link
Contributor

@telyn telyn commented Mar 8, 2020

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 :)

@telyn telyn marked this pull request as ready for review March 8, 2020 20:38
@telyn
Copy link
Contributor Author

telyn commented Mar 26, 2020

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!

@orta
Copy link
Member

orta commented Mar 26, 2020

👍 no worries, I've also not taken the time to review it too. Not on you

Copy link
Member

@orta orta left a 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]
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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?

Copy link
Member

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 👍

Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Contributor Author

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!

@orta
Copy link
Member

orta commented Apr 16, 2020

I can edit that TODO when I make the semver changes

@orta orta merged commit 3bc6b69 into danger:master Apr 16, 2020
@peril-staging
Copy link
Contributor

peril-staging bot commented Apr 16, 2020

Thanks for the PR @telyn.

This PR has been shipped in v7.0.0 - CHANGELOG.

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.

Message aggregation
2 participants