Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/git/branch_hooks_service.rb')
-rw-r--r--app/services/git/branch_hooks_service.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/services/git/branch_hooks_service.rb b/app/services/git/branch_hooks_service.rb
index a49b981c680..7a22d7ffcdf 100644
--- a/app/services/git/branch_hooks_service.rb
+++ b/app/services/git/branch_hooks_service.rb
@@ -21,8 +21,9 @@ module Git
def commits
strong_memoize(:commits) do
if creating_default_branch?
- # The most recent PROCESS_COMMIT_LIMIT commits in the default branch
- project.repository.commits(newrev, limit: PROCESS_COMMIT_LIMIT)
+ # The most recent PROCESS_COMMIT_LIMIT commits in the default branch.
+ # They are returned newest-to-oldest, but we need to present them oldest-to-newest
+ project.repository.commits(newrev, limit: PROCESS_COMMIT_LIMIT).reverse
elsif creating_branch?
# Use the pushed commits that aren't reachable by the default branch
# as a heuristic. This may include more commits than are actually
@@ -95,7 +96,7 @@ module Git
end
def track_ci_config_change_event
- return unless Gitlab::CurrentSettings.usage_ping_enabled?
+ return unless ::ServicePing::ServicePingSettings.enabled?
return unless default_branch?
commits_changing_ci_config.each do |commit|