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

Adapt emoji for Bitbucket server to fix "Database error has occurred" #645

Merged
merged 5 commits into from
Aug 1, 2018

Conversation

acecilia
Copy link
Member

@acecilia acecilia commented Aug 1, 2018

Bitbucket server only supports emojis in recent versions. For example, Bitbucket v4.10.1 does not support them, and when commenting with them the server returns an error saying "Database error has occurred".

Implementation similar to danger/danger@638943d#diff-4b908d596ce5ef33cce2a524a5694a4f

const fullDiff = danger.git.diffForFile('foo.js')
const addedLines = danger.git.diffForFile('foo.js', ['add'])
const removedLines = danger.git.diffForFile('foo.js', ['del'])
const fullDiff = danger.git.diffForFile("foo.js")
Copy link
Member Author

Choose a reason for hiding this comment

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

I did not add this changes, I think the hooks that the project has are causing this.

Copy link
Member

Choose a reason for hiding this comment

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

cool 👍

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, looks good 0- thanks

const fullDiff = danger.git.diffForFile('foo.js')
const addedLines = danger.git.diffForFile('foo.js', ['add'])
const removedLines = danger.git.diffForFile('foo.js', ['del'])
const fullDiff = danger.git.diffForFile("foo.js")
Copy link
Member

Choose a reason for hiding this comment

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

cool 👍

${results.messages.map(printViolation("📖")).join("\n")}
${results.fails.map(printViolation(noEntryEmoji)).join("\n")}
${results.warnings.map(printViolation(warningEmoji)).join("\n")}
${results.messages.map(printViolation(messageEmoji)).join("\n")}
Copy link
Member

Choose a reason for hiding this comment

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

Yep - this all makes sense 👍

@@ -13,6 +13,11 @@

## Master

# 3.8.3
Copy link
Member

Choose a reason for hiding this comment

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

Adding this means likely merge conflicts, best to leave them next time - I normally add this version when I create the new release. I should make a danger rule for that 👍

Copy link
Member Author

@acecilia acecilia Aug 1, 2018

Choose a reason for hiding this comment

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

I can avoid adding changelog for the next PR. Do you prefer that? Or just add the changelog without specifying the version?

@orta orta merged commit a6e6b66 into danger:master Aug 1, 2018
@peril-staging
Copy link
Contributor

peril-staging bot commented Aug 1, 2018

Thanks for the PR @acecilia.

This PR has been shipped in v3.8.3 - 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.

2 participants