summaryrefslogtreecommitdiff
path: root/lib/oxidized/hook/githubrepo.rb
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-04-21 13:27:05 +0200
committerWild Kat <wk@futureinquestion.net>2018-04-21 13:35:54 +0200
commit21e3d6490496573f25ef77fe8172766ac7d1a736 (patch)
tree785e5243f5f7ffe7e5a4bfcde551ec04c723b2ae /lib/oxidized/hook/githubrepo.rb
parent2648b1bb271727976e2d96123fcd51d52af39f79 (diff)
the great makeover - standardize layout, alignment, indentation
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