•  
     
    story #11419 have more insights about git repostories via REST API
Summary
jenkins developer
have more insights about git repostories via REST API

Have a cleaner implementation of Tuleap Branch Source Plugin

Add GET /git/:id/branches

[
    {
        "name": "master",
        "commit": {
            "id": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
        }
    },
    {
        "name": "develop",
        "commit": {
            "id": "2ba20bda73ed9ab9b7d745a83ab5328fb02295d7"
        }
    },
    ...
]

To list all branches that are readable by the user.

The route is paginated.

Add GET /git/:id/files?path=path/to/file&ref=string

{
    "encoding": "base64",
    "size": 5362,
    "name": "file",
    "path": "path/to/file",
    "content": "encoded content ..."
}

To get the content of a file on a given ref. If no ref given, refs/heads/master is used. The file is returned only if the requester can read it.
If the file does not exist of the requested path is not a file, a 404 will be thrown.
If the reference does not exist a 404 will be thrown.

Empty
Laurence Terrien (ltn), Clarck Robinson (robinsoc)
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
#11419
Manuel Vacelet (vaceletm)
2018-09-07 17:52
2018-04-19 15:14
4340

References

Follow-ups

User avatar
Thomas Gerbet (tgerbet)2018-09-07 17:05
Minor change in the representation of a commit to align ourselves with existing tools in this space.

  • 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
Thomas Gerbet (tgerbet)2018-08-24 10:19
The size does not seem needed at the moment to have a clean implementation of the Tuleap Branch Source plugin. Removing it from the ACs for now.

  • 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
  • Status changed from On going to Done
User avatar
Thomas Gerbet (tgerbet)2018-08-22 16:37
gerrit #12384 integrated in Tuleap 10.4.99.53.

  • 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
Thomas Gerbet (tgerbet)2018-08-21 14:09
Updating the story: the expectation for the GET /git/{id}/branches should be similar to what's being returned by other tools in the same domains and no fine grained permissions is used here. It's only a read operation and read permission for a Git repo are not fine grained.

  • 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
Thomas Gerbet (tgerbet)2018-08-09 13:29
Updating the expectations of the REST route used to retrieve content of a file: it can only be used to retrieve the content of a file.

  • 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
  • So that
    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
  • 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