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

[MM-1137]: Added Autolink support for cloud-oauth #1139

Merged
merged 10 commits into from
Jan 9, 2025
Merged

Conversation

Kshitij-Katiyar
Copy link
Contributor

@Kshitij-Katiyar Kshitij-Katiyar commented Nov 15, 2024

Summary

  • Added support for CloudOAuth for Autolink
  • Updated the API call to get Issues with AdminAPIToken
  • Added test cases for the SetupAutoLink function

Ticket Link

Fixes #1137

What to test

  • Autolink for Jira tickets
  • Issue comment notification after the admin has disconnected his Jira account
  • Keep an eye on the server logs

Testing step

  • Install autolink plugin for you MM
  • Install Jira plugin
  • Add the admin API token and admin email in the Jira plugin configuration before enabling it
  • enable the plugin
  • Paste a link to a jira ticket on your MM chat

plugin.json Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
server/issue.go Outdated Show resolved Hide resolved
server/plugin.go Show resolved Hide resolved
server/plugin.go Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
server/plugin_test.go Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
server/plugin.go Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
Copy link
Member

@wiggin77 wiggin77 left a comment

Choose a reason for hiding this comment

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

Approved after two minor text edits are applied.

Co-authored-by: Doug Lauder <[email protected]>
@raghavaggarwal2308 raghavaggarwal2308 removed the 2: Dev Review Requires review by a core committer label Dec 17, 2024
@arush-vashishtha
Copy link

@Kshitij-Katiyar While testing this PR and upon enabling the Jira plugin in the plugin management, I am getting the following server logs, please look into it. Also, the auto links are not working for Jira issues.
image

@arush-vashishtha
Copy link

@Kshitij-Katiyar This PR has been tested, and the expected functionality is working fine for all the projects in the jira cloud. However, we are receiving the following server log regarding the inability to add autolinks. Please review this; if it is not an issue, it can be considered approved from the QA side.
{"timestamp":"2025-01-08 16:37:59.442 +05:30","level":"info","msg":"could not install autolinks for cloud-oauth instance","caller":"app/plugin_api.go:1008","plugin_id":"jira","instance":"https://brightscout-dev.atlassian.net/","error":"some keys were not installed: unable to add autolinks: unable to install autolink. Error: 304, {\"status\": \"OK\"}"}
image

@Kshitij-Katiyar
Copy link
Contributor Author

Kshitij-Katiyar commented Jan 9, 2025

@Kshitij-Katiyar This PR has been tested, and the expected functionality is working fine for all the projects in the jira cloud. However, we are receiving the following server log regarding the inability to add autolinks. Please review this; if it is not an issue, it can be considered approved from the QA side. {"timestamp":"2025-01-08 16:37:59.442 +05:30","level":"info","msg":"could not install autolinks for cloud-oauth instance","caller":"app/plugin_api.go:1008","plugin_id":"jira","instance":"https://brightscout-dev.atlassian.net/","error":"some keys were not installed: unable to add autolinks: unable to install autolink. Error: 304, {\"status\": \"OK\"}"} image

@arush-vashishtha it was due to the Autolink plugin returning error if the Jira project is already installed for auto-link, handled the scenario. Please re-test

@raghavaggarwal2308 raghavaggarwal2308 added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Jan 9, 2025
@raghavaggarwal2308 raghavaggarwal2308 merged commit 4bcc7d9 into master Jan 9, 2025
11 checks passed
@raghavaggarwal2308 raghavaggarwal2308 deleted the MM-1137 branch January 9, 2025 11:45
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autolinks are not working in Jira after switching to oauth2
4 participants