Class: Gitlab::Git::Patches::CommitPatches
- Inherits:
-
Object
- Object
- Gitlab::Git::Patches::CommitPatches
- Includes:
- WrapsGitalyErrors
- Defined in:
- lib/gitlab/git/patches/commit_patches.rb
Instance Method Summary collapse
- #commit ⇒ Object
-
#initialize(user, repository, branch, patch_collection, target_sha) ⇒ CommitPatches
constructor
A new instance of CommitPatches.
Methods included from WrapsGitalyErrors
Constructor Details
#initialize(user, repository, branch, patch_collection, target_sha) ⇒ CommitPatches
Returns a new instance of CommitPatches.
9 10 11 12 13 14 15 |
# File 'lib/gitlab/git/patches/commit_patches.rb', line 9 def initialize(user, repository, branch, patch_collection, target_sha) @user = user @repository = repository @branch = branch @patches = patch_collection @target_sha = target_sha end |
Instance Method Details
#commit ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/gitlab/git/patches/commit_patches.rb', line 17 def commit repository.with_cache_hooks do wrapped_gitaly_errors do operation_service.user_commit_patches(user, branch_name: branch, patches: patches.content, target_sha: target_sha ) end end end |