-
Notifications
You must be signed in to change notification settings - Fork 58
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
[issue-174] Add Jira Autolink Issue With Comment Test Case #185
Conversation
Hello @sibasankarnayak, Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here. |
Codecov Report
@@ Coverage Diff @@
## master #185 +/- ##
=======================================
Coverage 41.49% 41.49%
=======================================
Files 6 6
Lines 670 670
=======================================
Hits 278 278
Misses 375 375
Partials 17 17 Continue to review full report at Codecov.
|
@mickmister added the test for regex independent of project. |
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
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 have a few questions on this. Since this PR is a proxy for how we will implement this in the Jira plugin, I'd like to resolve concerns here first, even though this is already merged.
"Comment url replacement", | ||
autolink.Autolink{ | ||
Pattern: "(https://mattermost.atlassian.net/browse/)(?P<project_id>\\w+)(-)(?P<jira_id>\\d+)[?](focusedCommentId)(=)(?P<comment_id>\\d+)", | ||
Template: "[${project_id}-${jira_id} With Comment #${comment_id}](https://mattermost.atlassian.net/browse/${project_id}-${jira_id}?focusedCommentId=${comment_id})", |
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.
Not sure if having the comment id in the link text is that helpful. The capitalization of "With Comment" seems weird too.
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.
@mickmister can you suggest a message for this , planning to raise a PR to fix your comments.
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.
How about:
[${project_id}-${jira_id} (comment)](https://mattermost.atlassian.net/browse/${project_id}-${jira_id}?focusedCommentId=${comment_id})
which would render as
This is how GitHub does their comment links, such as #185 (comment)
Sorry @mickmister , I should have waited for your review. |
@mickmister sure i raised this PR with your suggested changes , wanted suggestion for message on comment like how should it look like. This is the PR raised against your suggestion #189 |
No worries @hanzei. It took me quite a while to get to this 🙂 |
added jira test for url with comment and made it project independent
ticket here
Fixes #174