-
Notifications
You must be signed in to change notification settings - Fork 127
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-586] Added API token for fetching issue details #1102
Conversation
1. Added API token field in syatem console. 2. Added logic to fetch issue details with API token for comment and issue created events.
plugin.json
Outdated
"key": "AdminAPIToken", | ||
"display_name": "Admin API Token", | ||
"type": "text", | ||
"help_text": "This token is used to fetch some extra details for a Jira issue for comment related and 'issue created' subscription events.", |
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.
"help_text": "This token is used to fetch some extra details for a Jira issue for comment related and 'issue created' subscription events.", | |
"help_text": "This token is used to fetch some extra details for a Jira issue for 'comment related' and 'issue created' subscription events.", |
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.
Also, this isn't matching with the description of what to test?
Shouldn't we update it to something like Set this token to view notifications when the user is not connected
?
We should add the note here as mentioned in the description: API token is preferred to be created using an admin Jira account. Otherwise, notification will not be delivered for the project the API token user does not have access to.
Also, can we add this somewhere in readme or link here itself, on how to generate this token?
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.
@ayusht2810 Updated the help test. We will add documentation for this PR once the PR is approved
While testing this PR, I found an issue regarding the notifications. When the user who triggers the event is not connected but the API token is set for the instance, the user receives the notification. But when the API token is not set and the user is not connected, still the notifications are getting delivered on Mattermost instance. |
@AayushChaudhary0001 The above panic issue should be fixed now. Can you please re-test the PR. |
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.
The PR has been tested for the below conditions:-
- Notification received if the user is connected.
- Notifications for issue created and comment fit he user is not connected but the API token is set.
The PR is working fine for the above conditions, LGTM. Approved.
Summary
Screenshot
What to test?
How to test:
Note: API token is preferred to be created using an admin Jira account. Otherwise notification will not be delivered for the project the API token user do not have access to.