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
82df60dd
Commit
82df60dd
authored
Oct 17, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return more output for Factory::Repository::Push
parent
e806e264
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
qa/qa/resource/repository/push.rb
qa/qa/resource/repository/push.rb
+12
-10
No files found.
qa/qa/resource/repository/push.rb
View file @
82df60dd
...
...
@@ -12,6 +12,10 @@ module QA
attr_writer
:remote_branch
product
:output
do
|
factory
|
factory
.
output
end
def
initialize
@file_name
=
'file.txt'
@file_content
=
'# This is test file'
...
...
@@ -44,6 +48,8 @@ module QA
def
fabricate!
Git
::
Repository
.
perform
do
|
repository
|
@output
=
''
if
ssh_key
repository
.
uri
=
repository_ssh_uri
repository
.
use_ssh_key
(
ssh_key
)
...
...
@@ -62,29 +68,25 @@ module QA
email
=
user
.
email
end
repository
.
clone
@output
+=
repository
.
clone
repository
.
configure_identity
(
username
,
email
)
if
new_branch
repository
.
checkout_new_branch
(
branch_name
)
else
repository
.
checkout
(
branch_name
)
end
@output
+=
repository
.
checkout
(
branch_name
,
new_branch:
new_branch
)
if
@directory
@directory
.
each_child
do
|
f
|
repository
.
add_file
(
f
.
basename
,
f
.
read
)
if
f
.
file?
@output
+=
repository
.
add_file
(
f
.
basename
,
f
.
read
)
if
f
.
file?
end
elsif
@files
@files
.
each
do
|
f
|
repository
.
add_file
(
f
[
:name
],
f
[
:content
])
end
else
repository
.
add_file
(
file_name
,
file_content
)
@output
+=
repository
.
add_file
(
file_name
,
file_content
)
end
repository
.
commit
(
commit_message
)
@output
=
repository
.
push_changes
(
"
#{
branch_name
}
:
#{
remote_branch
}
"
)
@output
+=
repository
.
commit
(
commit_message
)
@output
+
=
repository
.
push_changes
(
"
#{
branch_name
}
:
#{
remote_branch
}
"
)
repository
.
delete_ssh_key
end
...
...
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