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

Fix danger to lookup comment for its own only #270

Merged
merged 1 commit into from
Jun 7, 2017

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Jun 7, 2017

This PR updates logics of getDangerCommentID, in addition to look up userid of given danger token but also looks for comment body if it has comment signature written via danger. For cases of user shares token for danger runner, it'll prevent comment is being deleted by danger looks up comment not written by itself.

Instead of introducing new hidden comment identifier, I took simple paths of looking signature directly (including HTML tags), which is sufficiently unique that individual user won't write those in their own comment.

Copy link
Member

@macklinu macklinu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just reading through the code changes, this is a really cool idea! I like the approach. 😃

@orta
Copy link
Member

orta commented Jun 7, 2017

This looks 👍 to me too - thanks @kwonoj

Bit surprised by the red, just re-ran it - should be fine if not, I'll throw an hour or two at danger tomorrow morning to try get these builds determinate

@kwonoj
Copy link
Member Author

kwonoj commented Jun 7, 2017

@orta seems it's continuously failing on travis (https://travis-ci.org/danger/danger-js/builds) by looking history, and log says jest-cli is missing, yarn does install pkg some way unexpected?

@orta
Copy link
Member

orta commented Jun 7, 2017

Alright, well I'll merge this for now as it's not due to your PR 👍

@orta orta merged commit 6b70985 into danger:master Jun 7, 2017
@kwonoj kwonoj deleted the fix-danger-comment-lookup branch June 7, 2017 22:29
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.

unique identifier for danger-written comments?
3 participants