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

[GH-167] Render JIRA webhook comments as quoted messages #467

Merged

Conversation

promulo
Copy link
Contributor

@promulo promulo commented Feb 6, 2020

Summary

This PR changes webhook handling for events of type "issue commented" and "issue comment edited" in order to render them as quoted messages in Mattermost.

Thanks for reviewing!

Screenshots

Issue commented

Before
image

After
image

Issue comment edited

Before
image

After
image

Ticket Link

Fixes #167.

@hanzei hanzei added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Feb 6, 2020
@hanzei
Copy link
Collaborator

hanzei commented Feb 6, 2020

@promulo Thanks for your PR! Heads up that there are a couple of tests failing: https://app.circleci.com/jobs/github/mattermost/mattermost-plugin-jira/4966

@promulo
Copy link
Contributor Author

promulo commented Feb 6, 2020

I see some tests failed, working on it.

@promulo
Copy link
Contributor Author

promulo commented Feb 6, 2020

Alright, I have updated the failing tests but now I wonder if my change really belongs where it is now or somewhere between the webhook parsing logic and PostToChannel. 🤔

@mickmister mickmister requested review from jfrerich and removed request for mickmister February 6, 2020 18:19
Copy link
Member

@cpoile cpoile left a comment

Choose a reason for hiding this comment

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

Looks fine to me; that's where we do formatting for the headline, so seems like an appropriate place.
Thanks @promulo !

Copy link
Contributor

@jfrerich jfrerich left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks, @promulo

@hanzei hanzei removed the 2: Dev Review Requires review by a core committer label Feb 20, 2020
Copy link

@DHaussermann DHaussermann left a comment

Choose a reason for hiding this comment

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

Tested and passed.

  • Comments now appear with the quote before them
  • Tested comment created and comment edit
  • Tested on subscription events as well as receiving an at mention that creates a DM from the bot
  • Tested on Server and Cloud

LGTM! Thanks @promulo for this enhancement!

Note There is a related issue where text does not show as indented when you use line breaks in a comment. MM-19652 exists in the backlog to address this.

@DHaussermann DHaussermann added 4: Reviews Complete All reviewers have approved the pull request QA Review Done PR has been approved by QA and removed 3: QA Review Requires review by a QA tester labels Feb 26, 2020
@jfrerich jfrerich merged commit 56bca86 into mattermost:master Feb 26, 2020
@promulo promulo deleted the GH-167-quote-issue-comments-from-webhooks branch February 26, 2020 17:52
@jfrerich jfrerich mentioned this pull request Mar 31, 2020
11 tasks
@jfrerich jfrerich mentioned this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request QA Review Done PR has been approved by QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render Jira webhook comments as slack attachment posts
5 participants