summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-09-27 10:28:27 +0000
committerRémy Coutable <remy@rymai.me>2018-09-27 10:28:27 +0000
commit2b5aa3efb86261e315ee770f95c111eb9b4bc416 (patch)
tree4e6d6ffc7818379b96135a603b4b32255a6e5e00 /doc
parentd5bce06df1ec36371db208d0aaf42d849eb63bcf (diff)
parent271776d4aa25a23b6f58c6befa94a240e61d4120 (diff)
downloadgitlab-ce-2b5aa3efb86261e315ee770f95c111eb9b4bc416.tar.gz
Merge branch '43832-adds-chdmod-to-commits-actions-api' into 'master'
Allows to work with execute permissions in GitLab API Closes #43832 See merge request gitlab-org/gitlab-ce!21866
Diffstat (limited to 'doc')
-rw-r--r--doc/api/commits.md12
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
}
]
}