Commit 44c03542 authored by Yorick Peterse's avatar Yorick Peterse Committed by Rémy Coutable

Merge branch 'reorder-language' into 'master'

Update language after doing all other operations

See merge request !3533
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ea1b80ae
......@@ -21,6 +21,7 @@ v 8.7.0 (unreleased)
v 8.6.5
- Fix importing from GitHub Enterprise. !3529
- Perform the language detection after updating merge requests in `GitPushService`, leading to faster visual feedback for the end-user. !3533
- Check permissions when user attempts to import members from another project. !3535
- Only update repository language if it is not set to improve performance. !3556
- Return status code 303 after a branch DELETE operation to avoid project deletion (Stan Hu). !3583
......
......@@ -43,13 +43,14 @@ class GitPushService < BaseService
@push_commits = @project.repository.commits_between(params[:oldrev], params[:newrev])
process_commit_messages
end
# Checks if the main language has changed in the project and if so
# it updates it accordingly
update_main_language
# Update merge requests that may be affected by this push. A new branch
# could cause the last commit of a merge request to change.
update_merge_requests
# Checks if the main language has changed in the project and if so
# it updates it accordingly
update_main_language
perform_housekeeping
end
......
......@@ -159,7 +159,6 @@ describe GitPushService, services: true do
end
describe "Updates main language" do
context "before push" do
it { expect(project.main_language).to eq(nil) }
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment