summaryrefslogtreecommitdiff
path: root/lib/oxidized/hook/githubrepo.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/hook/githubrepo.rb')
-rw-r--r--lib/oxidized/hook/githubrepo.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/oxidized/hook/githubrepo.rb b/lib/oxidized/hook/githubrepo.rb
index 4cae4e6..e077d5d 100644
--- a/lib/oxidized/hook/githubrepo.rb
+++ b/lib/oxidized/hook/githubrepo.rb
@@ -35,21 +35,20 @@ class GithubRepo < Oxidized::Hook
end
Rugged::Commit.create(repo, {
- parents: [repo.head.target, their_branch.target],
- tree: merge_index.write_tree(repo),
- message: "Merge remote-tracking branch '#{their_branch.name}'",
- update_ref: "HEAD"
- })
+ parents: [repo.head.target, their_branch.target],
+ tree: merge_index.write_tree(repo),
+ message: "Merge remote-tracking branch '#{their_branch.name}'",
+ update_ref: "HEAD"
+ })
end
private
def credentials
Proc.new do |url, username_from_url, allowed_types|
-
if cfg.has_key?('username')
git_user = cfg.username
- else
+ else
git_user = username_from_url ? username_from_url : 'git'
end