diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-19 12:34:04 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-19 12:34:04 +0300 |
commit | a5a5ec970e0e8dc56103decd3a0f5fbf3db46bcb (patch) | |
tree | adb5d12a1e56b06f724782ff893d0bb1bb4864e1 /app/workers | |
parent | 7ed6da5454c98e78770cee13ac929f5f608a34a1 (diff) |
Fewer constants, more helpers.
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/irker_worker.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/irker_worker.rb b/app/workers/irker_worker.rb index e1a99d9cad8..8b50f423984 100644 --- a/app/workers/irker_worker.rb +++ b/app/workers/irker_worker.rb @@ -57,9 +57,9 @@ class IrkerWorker end def send_branch_updates(push_data, project, repo_name, committer, branch) - if push_data['before'] == Gitlab::Git::BLANK_SHA + if Gitlab::Git.blank_ref?(push_data['before']) send_new_branch project, repo_name, committer, branch - elsif push_data['after'] == Gitlab::Git::BLANK_SHA + elsif Gitlab::Git.blank_ref?(push_data['after']) send_del_branch repo_name, committer, branch end end @@ -83,7 +83,7 @@ class IrkerWorker return if push_data['total_commits_count'] == 0 # Next message is for number of commit pushed, if any - if push_data['before'] == Gitlab::Git::BLANK_SHA + if Gitlab::Git.blank_ref?(push_data['before']) # Tweak on push_data["before"] in order to have a nice compare URL push_data['before'] = before_on_new_branch push_data, project end |