Add finder for getting commits with a trailer set
This class fetches all commits in a range in batches, selecting only commits with a certain trailer set. This class will be used to fetch the commits that should be used to generate a changelog. This builds on the changes introduced in https://gitlab.com/gitlab-org/gitaly/-/merge_requests/2842 and https://gitlab.com/gitlab-org/gitaly/-/merge_requests/2999. To take advantage of these changes, we also bump the Gitaly Gem version and add fallback code for getting trailers using Rugged; as Rugged is still in use. In addition, we change the merge_request_diff_commits table and the MergeRequestDiffCommit model to support storing the trailers as JSON. See https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1365 for more information.
显示
- Gemfile 1 个添加, 1 个删除Gemfile
- Gemfile.lock 2 个添加, 2 个删除Gemfile.lock
- app/finders/repositories/commits_with_trailer_finder.rb 82 个添加, 0 个删除app/finders/repositories/commits_with_trailer_finder.rb
- app/models/merge_request_context_commit.rb 3 个添加, 0 个删除app/models/merge_request_context_commit.rb
- app/models/merge_request_diff_commit.rb 5 个添加, 1 个删除app/models/merge_request_diff_commit.rb
- app/models/repository.rb 2 个添加, 1 个删除app/models/repository.rb
- app/services/merge_requests/add_context_service.rb 2 个添加, 1 个删除app/services/merge_requests/add_context_service.rb
- app/validators/json_schemas/git_trailers.json 9 个添加, 0 个删除app/validators/json_schemas/git_trailers.json
- changelogs/unreleased/gitaly-trailer-parsing.yml 5 个添加, 0 个删除changelogs/unreleased/gitaly-trailer-parsing.yml
- db/migrate/20210106155209_add_merge_request_diff_commit_trailers.rb 22 个添加, 0 个删除.../20210106155209_add_merge_request_diff_commit_trailers.rb
- db/migrate/20210107154615_add_merge_request_context_commit_trailers.rb 12 个添加, 0 个删除...210107154615_add_merge_request_context_commit_trailers.rb
- db/schema_migrations/20210106155209 1 个添加, 0 个删除db/schema_migrations/20210106155209
- db/schema_migrations/20210107154615 1 个添加, 0 个删除db/schema_migrations/20210107154615
- db/structure.sql 4 个添加, 2 个删除db/structure.sql
- lib/gitlab/git/commit.rb 2 个添加, 1 个删除lib/gitlab/git/commit.rb
- lib/gitlab/git/rugged_impl/commit.rb 1 个添加, 0 个删除lib/gitlab/git/rugged_impl/commit.rb
- lib/gitlab/gitaly_client/commit_service.rb 2 个添加, 1 个删除lib/gitlab/gitaly_client/commit_service.rb
- spec/finders/repositories/commits_with_trailer_finder_spec.rb 38 个添加, 0 个删除.../finders/repositories/commits_with_trailer_finder_spec.rb
- spec/lib/gitlab/git/commit_spec.rb 2 个添加, 1 个删除spec/lib/gitlab/git/commit_spec.rb
- spec/lib/gitlab/import_export/safe_model_attributes.yml 2 个添加, 0 个删除spec/lib/gitlab/import_export/safe_model_attributes.yml
加载中
想要评论请 注册 或 登录