-
- Downloads
Refactor PostReceive to be more readable
This refactors the implementation of gathering/iterating changes from the post-receive hook to be a bit more readable (removed the need for calling `enum_for(:changes_refs)` in different places). This is done with the help of the new `Gitlab::Git::Changes` collection object which will be used while parsing the changes. Also changed the signature of BranchPushService and TagPushService to accept a single `change` param instead of having oldrev, newrev and ref params. This also prepares the `PostReceive` worker to be able to process branches and tags separately so we'll be able to aggregate events by branches or tags.
Showing
- app/services/concerns/git/change_params.rb 17 additions, 0 deletionsapp/services/concerns/git/change_params.rb
- app/services/git/base_hooks_service.rb 8 additions, 7 deletionsapp/services/git/base_hooks_service.rb
- app/services/git/branch_hooks_service.rb 8 additions, 8 deletionsapp/services/git/branch_hooks_service.rb
- app/services/git/branch_push_service.rb 7 additions, 6 deletionsapp/services/git/branch_push_service.rb
- app/services/git/tag_hooks_service.rb 3 additions, 3 deletionsapp/services/git/tag_hooks_service.rb
- app/services/git/tag_push_service.rb 3 additions, 1 deletionapp/services/git/tag_push_service.rb
- app/workers/post_receive.rb 26 additions, 31 deletionsapp/workers/post_receive.rb
- db/fixtures/development/17_cycle_analytics.rb 5 additions, 3 deletionsdb/fixtures/development/17_cycle_analytics.rb
- ee/app/services/ee/git/branch_push_service.rb 2 additions, 2 deletionsee/app/services/ee/git/branch_push_service.rb
- ee/app/services/ee/git/wiki_push_service.rb 3 additions, 3 deletionsee/app/services/ee/git/wiki_push_service.rb
- ee/app/services/projects/update_mirror_service.rb 4 additions, 4 deletionsee/app/services/projects/update_mirror_service.rb
- ee/app/workers/ee/post_receive.rb 1 addition, 3 deletionsee/app/workers/ee/post_receive.rb
- ee/db/fixtures/development/90_productivity_analytics.rb 5 additions, 3 deletionsee/db/fixtures/development/90_productivity_analytics.rb
- ee/spec/services/ee/git/branch_push_service_spec.rb 11 additions, 13 deletionsee/spec/services/ee/git/branch_push_service_spec.rb
- ee/spec/services/ee/git/wiki_push_service_spec.rb 3 additions, 3 deletionsee/spec/services/ee/git/wiki_push_service_spec.rb
- ee/spec/services/projects/update_mirror_service_spec.rb 1 addition, 1 deletionee/spec/services/projects/update_mirror_service_spec.rb
- lib/gitlab/git/changes.rb 74 additions, 0 deletionslib/gitlab/git/changes.rb
- lib/gitlab/git_post_receive.rb 20 additions, 23 deletionslib/gitlab/git_post_receive.rb
- spec/features/projects/environments/environment_spec.rb 5 additions, 3 deletionsspec/features/projects/environments/environment_spec.rb
- spec/lib/gitlab/git/changes_spec.rb 81 additions, 0 deletionsspec/lib/gitlab/git/changes_spec.rb
app/services/concerns/git/change_params.rb
0 → 100644
lib/gitlab/git/changes.rb
0 → 100644
spec/lib/gitlab/git/changes_spec.rb
0 → 100644
Please register or sign in to comment