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

Make BitBucket Server username matching case insensitive #1291

Merged

Conversation

DavidBrunow
Copy link
Contributor

This fixes #1290.

@@ -213,7 +213,7 @@ export class BitBucketServerAPI implements BitBucketServerAPIDSL {

return comments
.filter(comment => comment!.text.includes(dangerIDMessage))
.filter(comment => username || comment!.author.name === username)
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'm not sure the history behind the username || part of this code but it does not seem like the proper logic? Happy to revert removing it if I need to.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I can't figure it out either, so lets take it and see

@@ -241,6 +241,49 @@ describe("API testing - BitBucket Server", () => {
])
})

it("getDangerCommentsCaseInsensitive", async () => {
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 added extra tests rather than changing the existing tests to have case differences in the usernames. I went this way to it is more obvious why the usernames don't match perfectly but I'm happy to make changes to go any other direction.

Copy link
Member

@f-meloni f-meloni left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the PR :)

@orta
Copy link
Member

orta commented Jul 23, 2022

👍🏻

@orta orta merged commit a5a33fe into danger:main Jul 23, 2022
@orta
Copy link
Member

orta commented Jul 23, 2022

I have to release on a mac nowadays, so nextx time I'm on one I'll ship a build

@DavidBrunow DavidBrunow deleted the make_username_conditionals_case_insensitive branch July 23, 2022 15:27
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.

BitBucket Server username matching is case sensitive
3 participants