•  
      story #7687 REST endpoint to list project'ss git repositories
    Summary
    git user
    REST endpoint to list project'ss git repositories
    Empty

    Based on existing tuleap REST api

    
    Update GET /v1/projects/:id
    Add in "resources":
    {
        "type": "git",
        "uri": "projects/:id/git"
    }
    Add OPTIONS /v1/projects/:id/git
    Add GET /v1/projects/:id/git
    {
        "repositories": [
            {
                "id": 123,
                "uri": "/v1/git/123",
                "name": "/projectname/repo/path.git",
                "description": "bla"
            },
            ...
        ]
    }
    GET /v1/projects/:id/git?full
    {
        "repositories": [
            {
                "id": :id,
                "uri": "/v1/git/:id",
                "name": "/projectname/repo/path.git",
                "description": "bla",
                "permissions": {
                    "read": [ <user_group_def> ],
                    "write": [ <user_group_def> ],
                    "rewind": [ <user_group_def> ]
                }
            },
            ...
        ]
    }

    Important => those 2 GET route must manage pagination

    Add OPTIONS /v1/git/:id
    Add GET /v1/git/:id
    {
        "id": :id,
        "uri": "/v1/git/:id",
        "name": "/projectname/repo/path.git",
        "description": "bla",
        "permissions": {
            "read": [ <user_group_def> ],
            "write": [ <user_group_def> ],
            "rewind": [ <user_group_def> ]
        }
    }
    
    
    <user group def> (for reference, already existing)
    {
        "id": "101_3",
        "uri": "user_groups/101_3",
        "label": "project_members",
        "users_uri": "user_groups/101_3/users"
    }

    Permissions:

    • id, uri, name, description are accessible as long as the user has access to the repo

    • permissions are accessible only to git administrators

    Empty
    Nouha Terzi (terzino), Salma MOAKHAR (moakhars), Denis PILAT (denis_pilat)
    Status
    Empty
    Done
    Development
    • [ ] Does it involves User Interface? 
    • [ ] Are there any mockups?
    • [ ] Are permissions checked?
    • [ ] Does it need Javascript development?
    • [ ] Does it need a forge upgrade bucket?
    • [ ] Does it need to execute things in system events?
    • [ ] Does it impact project creation (templates)?
    • [ ] Is it exploratory?
    Empty
    Details
    #7687
    Manuel Vacelet (vaceletm)
    2015-01-02 16:05
    2014-12-11 12:08
    7691

    References
    Referencing story #7687

    Artifact Tracker v5

    rel #7436 7.9

    Git commit

    tuleap/tuleap/stable

    Create a repo in test REST data builder e0cc21fc94
    task #14862 plugins REST tests are run by CI d5a6ae48b4
    Create route OPTION and GET /v1/projects/:id/git 29899be3c3
    Modify array_slice by SQL query d0a8349752
    Add fields option e8d9d2b969
    Merge commit 'refs/changes/23/3423/4' of ssh://gerrit.tuleap.net:29418/tuleap into HEAD e6d26353db
    story #7687: adding routes GET & OPTIONS to uri /git/:id 8cd39e63e0

    tuleap/u/vaceletm/tuleap/dev

    Merge commit 'refs/changes/23/3423/4' of ssh://gerrit.tuleap.net:29418/tuleap into HEAD e6d26353db
    story #7687: adding routes GET & OPTIONS to uri /git/:id 8cd39e63e0
    Add fields option e8d9d2b969
    Modify array_slice by SQL query d0a8349752
    Create route OPTION and GET /v1/projects/:id/git 29899be3c3
    task #14862 plugins REST tests are run by CI d5a6ae48b4
    Create a repo in test REST data builder e0cc21fc94

    Follow-ups

    User avatar

    Please note that we renamed the 'full' parameter to 'fields' so that it respects the convention used until now for such resources.

    GET /api/v1/projects/:id/git?fields=basic
    GET /api/v1/projects/:id/git?fields=all      #same as basic plus permissions

    This is currently available on stable/master.


    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar

    Question for denis/nouha/salma: Is there a need for a route that get all the detailed informations at once, like:

    GET /v1/projects/:id/git?full
    [
        {
            "id": :id,
            "uri": "/v1/git/:id",
            "name": "/projectname/repo/path.git",
            "description": "bla",
            "permissions": {
                "read": [ <user_group_def> ],
                "write": [ <user_group_def> ],
                "rewind": [ <user_group_def> ]
            }
        },
        ...
    ]

    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes
    User avatar
    • Acceptance criteria
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes