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) ...@@ -21,6 +21,7 @@ v 8.7.0 (unreleased)
v 8.6.5 v 8.6.5
- Fix importing from GitHub Enterprise. !3529 - 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 - 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 - 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 - Return status code 303 after a branch DELETE operation to avoid project deletion (Stan Hu). !3583
......
...@@ -43,13 +43,14 @@ class GitPushService < BaseService ...@@ -43,13 +43,14 @@ class GitPushService < BaseService
@push_commits = @project.repository.commits_between(params[:oldrev], params[:newrev]) @push_commits = @project.repository.commits_between(params[:oldrev], params[:newrev])
process_commit_messages process_commit_messages
end 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 # Update merge requests that may be affected by this push. A new branch
# could cause the last commit of a merge request to change. # could cause the last commit of a merge request to change.
update_merge_requests 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 perform_housekeeping
end end
......
...@@ -159,7 +159,6 @@ describe GitPushService, services: true do ...@@ -159,7 +159,6 @@ describe GitPushService, services: true do
end end
describe "Updates main language" do describe "Updates main language" do
context "before push" do context "before push" do
it { expect(project.main_language).to eq(nil) } it { expect(project.main_language).to eq(nil) }
end 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