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
Make BitBucket Server username matching case insensitive #1291
Conversation
@@ -213,7 +213,7 @@ export class BitBucketServerAPI implements BitBucketServerAPIDSL { | |||
|
|||
return comments | |||
.filter(comment => comment!.text.includes(dangerIDMessage)) | |||
.filter(comment => username || comment!.author.name === username) |
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'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.
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.
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 () => { |
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 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.
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.
LGTM, thank you for the PR :)
👍🏻 |
I have to release on a mac nowadays, so nextx time I'm on one I'll ship a build |
This fixes #1290.