Commit 904615c1509b0923ba9b785d41cafcd264952d54

Authored by Riyad Preukschas
1 parent 7192f86e

Update satellite action docs

lib/gitlab/satellite/edit_file_action.rb
1 1 module Gitlab
2 2 module Satellite
3   - # GitLab file editor
4   - #
5   - # It gives you ability to make changes to files
6   - # & commit this changes from GitLab UI.
  3 + # GitLab server-side file update and commit
7 4 class EditFileAction < Action
8 5 attr_accessor :file_path, :ref
9 6  
... ... @@ -13,6 +10,12 @@ module Gitlab
13 10 @ref = ref
14 11 end
15 12  
  13 + # Updates the files content and creates a new commit for it
  14 + #
  15 + # Returns false if the ref has been updated while editing the file
  16 + # Returns false if commiting the change fails
  17 + # Returns false if pushing from the satellite to Gitolite failed or was rejected
  18 + # Returns true otherwise
16 19 def commit!(content, commit_message, last_commit)
17 20 return false unless can_edit?(last_commit)
18 21  
... ...
lib/gitlab/satellite/merge_action.rb
1 1 module Gitlab
2 2 module Satellite
  3 + # GitLab server-side merge
3 4 class MergeAction < Action
4 5 attr_accessor :merge_request
5 6  
... ... @@ -8,6 +9,7 @@ module Gitlab
8 9 @merge_request = merge_request
9 10 end
10 11  
  12 + # Checks if a merge request can be executed without user interaction
11 13 def can_be_merged?
12 14 in_locked_and_timed_satellite do |merge_repo|
13 15 merge_in_satellite!(merge_repo)
... ...