diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2018-09-23 12:48:29 +0200 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2018-09-27 11:51:15 +0200 |
commit | 271776d4aa25a23b6f58c6befa94a240e61d4120 (patch) | |
tree | 5643a3e07a8e5efd9b03398d36e23606e91df091 /doc/api/commits.md | |
parent | a1529944e962fc9b4addee324b4e606c4b7b1e93 (diff) | |
download | gitlab-ce-271776d4aa25a23b6f58c6befa94a240e61d4120.tar.gz |
Adds chmod action to POST /projects/:id/repository/commits API
With this action the user can update the execute_filemode of a given file in the repository.
Diffstat (limited to 'doc/api/commits.md')
-rw-r--r-- | doc/api/commits.md | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/api/commits.md b/doc/api/commits.md index 624ed529009..5ff1e1f60e0 100644 --- a/doc/api/commits.md +++ b/doc/api/commits.md @@ -83,12 +83,13 @@ POST /projects/:id/repository/commits | `actions[]` Attribute | Type | Required | Description | | --------------------- | ---- | -------- | ----------- | -| `action` | string | yes | The action to perform, `create`, `delete`, `move`, `update` | +| `action` | string | yes | The action to perform, `create`, `delete`, `move`, `update`, `chmod`| | `file_path` | string | yes | Full path to the file. Ex. `lib/class.rb` | -| `previous_path` | string | no | Original full path to the file being moved. Ex. `lib/class1.rb` | -| `content` | string | no | File content, required for all except `delete`. Optional for `move` | +| `previous_path` | string | no | Original full path to the file being moved. Ex. `lib/class1.rb`. Only considered for `move` action. | +| `content` | string | no | File content, required for all except `delete` and `chmod`. Optional for `move` | | `encoding` | string | no | `text` or `base64`. `text` is default. | | `last_commit_id` | string | no | Last known file commit id. Will be only considered in update, move and delete actions. | +| `execute_filemode` | boolean | no | When `true/false` enables/disables the execute flag on the file. Only considered for `chmod` action. | ```bash PAYLOAD=$(cat << 'JSON' @@ -115,6 +116,11 @@ PAYLOAD=$(cat << 'JSON' "action": "update", "file_path": "foo/bar5", "content": "new content" + }, + { + "action": "chmod", + "file_path": "foo/bar5", + "execute_filemode": true } ] } |