Cannot configure github.com repo

Issue #33 resolved
mfpinhal created an issue

Hey Dmitrii,

We are not able to get the plugin working for our organization. We have our code in github.com and we are trying to setup the plugin working for our JIRA server (local installation JIRA 7.8.1). Jigit version is 1.2.4.

We first tried to setup Jigit for all our organization, but we have ~20k branches, it was taking a long time to sync and we could not see any commits. Now we want to try to configure for a single repository, but we are unable to proceed due to an error (see attachments).

Thanks for your time! Best, Mario

Comments (6)

  1. Dmitrii Apanasevich repo owner

    Hi Mario,

    Are you sure that branch master exists in your repository? Is repo path correct?

    Let's take this repo for example. Here flyway is an organization name and flyway-play is a repo name. To configure this repo you should enter a full path: flyway/flyway-play.

    Now, let's take a look at branches.

    This command returns a successful result:

    curl -H "Authorization: token MY_GITHUB_TOKEN" https://api.github.com/repos/flyway/flyway-play/branches/master
    

    When I change branch name to whatever (this branch doesn't exist), I get the same result as at your screenshot (Branch not found)

    curl -H "Authorization: token MY_GITHUB_TOKEN" https://api.github.com/repos/flyway/flyway-play/branches/whatever
    

    You can get a list of branches for your repo with this command:

    curl -H "Authorization: token YOUR_GITHUB_TOKEN" https://api.github.com/repos/{YOUR_REPO_FULL_PATH}/branches
    

    Could you check, if branch master exists?

  2. mfpinhal reporter

    Hey @dmitry_apanasevich. First of all, thanks for your time and for this plugin.

    We did try it out the direct API calls to the Github API, it seems the same issue as in https://bitbucket.org/dmitry_apanasevich/jira-jigit-plugin/issues/28/no-commit-information-was-pulled-into-jira#comment-43650352 - it only works if we select full repo permission, contrary to what was stated in documentation/wiki. These are private repositories to our organization.

    Ideally, from a user/organization perspective, such grant of permissions would be avoidable.

    Do you think that there is something that can be changed in the plugin to only need the repo:status permission, or is it a current Github API limitation?

    Thanks!

  3. Dmitrii Apanasevich repo owner

    Hi Mario,

    Thanks for for details of your investigation.

    I followed this GitHub guide when I was writing the plugin wiki. It states that repo:status permission is sufficient to get access to privite repos. Apparently, something has changed at GitHub side. It's the second time when full permissions are required.

    I'll carry out the topic and keep you up-to-date.

  4. Log in to comment