•  
     
    story #10214 manage svn "commit rules" with REST API
Summary
Empty
manage svn "commit rules" with REST API

I can automate the management of svn repositories with my own rules

GET | OPTIONS /projects/:id/svn

{
  "collection": [
    {
        "id": int,
        "uri": "/svn/:id"
        "name": string
    },
    ...
  ]
}

GET /projects/:id/svn?query=XXX

{
  "collection": [
    {
        "id": int,
        "uri": "/svn/:id"
        "name": string
    }
  ]
}
  • Allow to search for 1 repository in a given project
  • The filter is not compatible with wildcard for now

GET | OPTIONS /svn/:id

{
    "id": int,
    "project_id": int,
    "uri": "/svn/:id"
    "name": string
    "settings": {
        "commit_rules": {
            "mandatory_reference": boolean,
            "allow_commit_message_change": boolean
        }
    }
}
  • note: the "settings" part is only viewable by people who are svn administrators, project administrators or site administrators

POST | OPTIONS /svn

{
    "project_id": int,
    "name": string
    "settings": {
        "commit_rules": {
            "mandatory_reference": boolean,
            "allow_commit_message_change": boolean
        }
    }
}
  • Creates a new repository
    • The repository is not physically created "right away" as it's done by a background "system event" that can take up to 2 minutes to be processed. However the route will return 201 (created) is informations are valid + a specific message to inform that the actual creation of the repository will occur later
    • As an evolution of the API we might imagin that the POST representation defined here could have a "callback_uri" the would be called by Tuleap server once the repository is created so calling script/application could be informed about it automatically.
  • This action is restricted to svn administrators, project administrators or site administrators

PUT /svn/:id

{
    "id": int
    "settings": {
        "commit_rules": {
            "mandatory_reference": boolean,
            "allow_commit_message_change": boolean
        }
    }
}
  • Update repository configuration
  • The change is logged in project audit trail (project history)
  • This action is restricted to svn administrators, project administrators or site administrators
  • Returns RepositoryRepresentation like GET

DELETE /svn/:id

  • This action is restricted to svn administrators, project administrators or site administrators
  • Delete the repository
Empty
Empty
Status
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
#10214
Manuel Vacelet (vaceletm)
2017-07-19 11:15
2017-05-15 11:13
3268

References
Referencing story #10214

Git commit

tuleap/tuleap/stable

Follow-ups