Skip to content

Use correct scope when authorizing with Jira GitHub DVCS connector

Markus Koller requested to merge 257843-fix-jira-dvcs-github-scope into master

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:

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:

image

Confirm that, and if everything works correctly you should see the synced repositories in Jira:

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Markus Koller

Merge request reports