Make REST API to adding new project in Jigit plugin

Issue #77 resolved
Former user created an issue

It is required to develop a REST API for adding new projects to the Jigit plugin. Please consider the possibility of such an exercise. We have 1500 GitLab projects and 70 Jira instances

Comments (2)

  1. Dmitrii Apanasevich repo owner

    Actually, the add-on already has got REST API which allows to manipulate its configuration. I’ve created an issue for documenting its endpoints.

    Here is only one, which allows to add a new repository:

    Endpoint URL: http://{URL:PORT}/{PATH}/rest/jigit/1.0/repo/add

    Method: POST

    Parameters:

    1. repo_name - a name of a repo
    2. url - address of a git server
    3. service_type - type of a server. One of the values: GitLab, GitLab8 or GitHub
    4. token - auth token
    5. repo_type - type of repo, one of the values: SingleRepository or GroupOfRepositories
    6. repository_id - repo identifier, usually consists of {username}/{reponame}
    7. def_branch - default branch of the repo
    8. index_all_branches - evidential, one of the values: true or false

    For example, I’ve configured repo https://github.com/apanasevich/java-gitlab-api in my local JIRA via this:

    curl -u admin:admin -d "repo_name=java-gitlab-api&url=https%3A%2F%2Fgithub.com&service_type=GitHub&token=my_prescious&repo_type=SingleRepository&repository_id=apanasevich%2Fjava-gitlab-api&def_branch=master&index_all_branches=false" -X POST http://localhost:2990/jira/rest/jigit/1.0/repo/add
    
  2. Log in to comment