Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
904615c1
Commit
904615c1
authored
Oct 26, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update satellite action docs
parent
7192f86e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
lib/gitlab/satellite/edit_file_action.rb
lib/gitlab/satellite/edit_file_action.rb
+7
-4
lib/gitlab/satellite/merge_action.rb
lib/gitlab/satellite/merge_action.rb
+2
-0
No files found.
lib/gitlab/satellite/edit_file_action.rb
View file @
904615c1
module
Gitlab
module
Gitlab
module
Satellite
module
Satellite
# GitLab file editor
# GitLab server-side file update and commit
#
# It gives you ability to make changes to files
# & commit this changes from GitLab UI.
class
EditFileAction
<
Action
class
EditFileAction
<
Action
attr_accessor
:file_path
,
:ref
attr_accessor
:file_path
,
:ref
...
@@ -13,6 +10,12 @@ module Gitlab
...
@@ -13,6 +10,12 @@ module Gitlab
@ref
=
ref
@ref
=
ref
end
end
# Updates the files content and creates a new commit for it
#
# Returns false if the ref has been updated while editing the file
# Returns false if commiting the change fails
# Returns false if pushing from the satellite to Gitolite failed or was rejected
# Returns true otherwise
def
commit!
(
content
,
commit_message
,
last_commit
)
def
commit!
(
content
,
commit_message
,
last_commit
)
return
false
unless
can_edit?
(
last_commit
)
return
false
unless
can_edit?
(
last_commit
)
...
...
lib/gitlab/satellite/merge_action.rb
View file @
904615c1
module
Gitlab
module
Gitlab
module
Satellite
module
Satellite
# GitLab server-side merge
class
MergeAction
<
Action
class
MergeAction
<
Action
attr_accessor
:merge_request
attr_accessor
:merge_request
...
@@ -8,6 +9,7 @@ module Gitlab
...
@@ -8,6 +9,7 @@ module Gitlab
@merge_request
=
merge_request
@merge_request
=
merge_request
end
end
# Checks if a merge request can be executed without user interaction
def
can_be_merged?
def
can_be_merged?
in_locked_and_timed_satellite
do
|
merge_repo
|
in_locked_and_timed_satellite
do
|
merge_repo
|
merge_in_satellite!
(
merge_repo
)
merge_in_satellite!
(
merge_repo
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment