Tuleap Community Edition development and releases are no longer public. You have until September 30th to download packages and sources in Tuleap project. You can contact the team if you need further assistance.

  •  
     
    story #10217 manage "notifications" with REST API
Summary
Empty
manage "notifications" with REST API
Empty

Update existing routes:

GET /svn/:id

{
    "id": int,
    ...
    "settings": {
        "commit_rules": {
            "mandatory_reference": boolean,
            "allow_commit_message_change": boolean
        },
        "access_file": [
            "[/]",
            "* = ",
            "Contributors = r",
            "[/stuff]",
            "Contributors = rw"
        ],
        "immutable_tags": {
            "paths": [
                "/tags"
            ],
            "whitelist": [
                "/tags/moduleX"
            ]
        },
        "email_notifications": {
            [
                {
                    "path": "/trunk",
                    "user_groups": [
                        {
                            "id": "101_3",
                            "uri": "user_groups/101_3",
                            "label": "Project members"
                        },
                        UserGroupRepresentation
                    ],
                    "users": [
                        {
                            "id": 333,
                            "uri": "/users/333",
                            "username": "...",
                            ...
                        },
                        UserRepresentation
                    ],
                    "emails": [
                        "foo@example.com",
                        string
                    ]
                }
            ]
        }
    }
}

POST /svn

{
    ...
    "settings": {
        "commit_rules": {
            "mandatory_reference": boolean,
            "allow_commit_message_change": boolean
        },
        "access_file": [
            "[/]",
            "* = ",
            "Contributors = r",
            "[/stuff]",
            "Contributors = rw"
        ],
        "immutable_tags": {
            "paths": [
                "/tags"
            ],
            "whitelist": [
                "/tags/moduleX"
            ]
        },
        "email_notifications": {
            [
                {
                    "path": "/trunk",
                    "user_groups": [
                        {
                            "id": "101_3"
                        },
                        UserGroupRepresentation
                    ],
                    "users": [
                        {
                            "id": 333
                        },
                        UserRepresentation
                    ],
                    "emails": [
                        "foo@example.com",
                        string
                    ]
                }
            ]
        }
    }
}
  • For both "user_groups" and "user" the key is the id but the whole Representation can be passed along (and will be ignored). This ease the REST call chaining.

PUT /svn/:id

{
    "id": int
    "settings": {
        "commit_rules": {
            "mandatory_reference": boolean,
            "allow_commit_message_change": boolean
        },
        "access_file": [
            "[/]",
            "* = ",
            "Contributors = r",
            "[/stuff]",
            "Contributors = rw"
        ],
        "immutable_tags": {
            "paths": [
                "/tags"
            ],
            "whitelist": [
                "/tags/moduleX"
            ]
        },
        "email_notifications": {
            [
                {
                    "path": "/trunk",
                    "user_groups": [
                        {
                            "id": "101_3",
                        },
                        UserGroupRepresentation
                    ],
                    "users": [
                        {
                            "id": 333,
                        },
                        UserRepresentation
                    ],
                    "emails": [
                        "foo@example.com",
                        string
                    ]
                }
            ]
        }
    }
}
  • For both "user_groups" and "user" the key is the id but the whole Representation can be passed along (and will be ignored). This ease the REST call chaining.
  • Changes are recorded in Project History
Empty
Empty
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
#10217
Manuel Vacelet (vaceletm)
2017-09-06 13:10
2017-05-15 11:42
4494

References

Follow-ups

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
  • Permissions set to