summaryrefslogtreecommitdiff
path: root/lib/oxidized/hook/githubrepo.rb
diff options
context:
space:
mode:
authorRon <rgnv@users.noreply.github.com>2018-04-27 06:24:56 -0700
committerGitHub <noreply@github.com>2018-04-27 06:24:56 -0700
commit2bb40ad4d9e31cf2cd63a373f7c607eb86547e46 (patch)
treec12b52f0acd5192c457fa07189c4946674cd11fb /lib/oxidized/hook/githubrepo.rb
parentec90b081f0fed05497ce6ae21e4b4ba4d44ecc01 (diff)
parent83a00943d7333fafdfe352173713a22a5ac89f6f (diff)
Merge pull request #1 from wk/pr-1280
massage into rubocop compliance
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