diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-07-31 19:35:02 +0300 |
---|---|---|
committer | Francisco Javier López <fjlopez@gitlab.com> | 2018-11-07 16:03:30 +0300 |
commit | 28cbb2acfe413148ff23b8ed4b3293e09ab376f5 (patch) | |
tree | 0d8546cda9e06b79d03886e9ee82128b03c1d8d6 /app/models | |
parent | 681d927f18f81755d88c56c0b6e267c9866c7bb4 (diff) |
Add submodule update API endpoint
This new endpoint allow users to update a submodule's reference.
The MR involves adding a new operation RPC operation in gitaly-proto
(see gitlab-org/gitaly-proto!233) and change Gitaly to use this
new version (see gitlab-org/gitaly!936).
See gitlab-org/gitlab-ce!20949
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/repository.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index ee5579329a8..6e179f61a7b 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1014,6 +1014,18 @@ class Repository message: merge_request.title) end + def update_submodule(user, submodule, commit_sha, message:, branch:) + with_cache_hooks do + raw.update_submodule( + user: user, + submodule: submodule, + commit_sha: commit_sha, + branch: branch, + message: message + ) + end + end + def blob_data_at(sha, path) blob = blob_at(sha, path) return unless blob |