Use correct scope when authorizing with Jira GitHub DVCS connector
What does this MR do?
When using the GitHub Enterprise connector in Jira we receive the "repo" scope, this doesn't exist in GitLab but we can map it to our "api" scope.
Fixes #257843 (closed)
Initially we planned to just document this as a manual workaround, but after realizing that some users also use the GitHub DVCS connector with self-managed GitLab and Jira Cloud (where the GitLab connector is unfortunately not available) we decided to implement this fairly simple fix instead. See the discussion at !60301 (comment 561428365) for details.
Manual testing
You can use our Jira Server test instance at http://jira.reali.sh:8080/secure/Dashboard.jspa, the initial authorization request works with GDK (using a localhost URL), but to test the full flow you need to use Gitpod.
Follw the steps in our docs:
- https://docs.gitlab.com/ee/integration/jira/dvcs.html#configure-a-gitlab-application-for-dvcs
-
https://docs.gitlab.com/ee/integration/jira/dvcs.html#configure-jira-for-dvcs
- Make sure to enter an existing group/namespace in Team or User Account, I initially assumed this was just a label
😉
- Make sure to enter an existing group/namespace in Team or User Account, I initially assumed this was just a label
After clicking Add in the last step you have to click Continue, and will then be redirected to GitLab where you see the authorization prompt:
Confirm that, and if everything works correctly you should see the synced repositories in Jira:
Does this MR meet the acceptance criteria?
Conformity
-
I have included a changelog entry, or it's not needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) - [-] I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?)
- [-] I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?)
-
I have self-reviewed this MR per code review guidelines. - [-] This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines)
-
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) - [-] I have tested this MR in all supported browsers, or it's not needed.
- [-] I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.