Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIVIS-2938] Git tree upload - git command line integration #151

Merged
merged 12 commits into from
Apr 5, 2024

Conversation

anmarchenko
Copy link
Member

@anmarchenko anmarchenko commented Apr 4, 2024

What does this PR do?

  • Consolidates all calls to external git commands in new module Datadog::CI::Git::LocalRepository
  • Makes exec_git_command inaccessible from outside of this module to make shell injections less likely by reviewing that all calls to this method are done with static parameters
  • Adds git_commits, git_commits_rev_list, git_generate_packfiles methods to support git tree uploading functionality

How to test the change?
Unit tests are provided

@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2024

Codecov Report

Attention: Patch coverage is 98.61111% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 99.03%. Comparing base (9716194) to head (f9a6d5c).

Files Patch % Lines
lib/datadog/ci/git/local_repository.rb 95.83% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              1.0     #151      +/-   ##
==========================================
+ Coverage   99.02%   99.03%   +0.01%     
==========================================
  Files         179      182       +3     
  Lines        8090     8229     +139     
  Branches      339      341       +2     
==========================================
+ Hits         8011     8150     +139     
  Misses         79       79              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anmarchenko anmarchenko changed the title [CIVIS-2938] Search commits [CIVIS-2938] New git commands support Apr 4, 2024
@anmarchenko anmarchenko changed the title [CIVIS-2938] New git commands support [CIVIS-2938] Git tree upload - git command line integration Apr 5, 2024
@anmarchenko anmarchenko marked this pull request as ready for review April 5, 2024 08:58
@anmarchenko anmarchenko requested review from a team as code owners April 5, 2024 08:58
@anmarchenko anmarchenko merged commit d962502 into 1.0 Apr 5, 2024
23 checks passed
@anmarchenko anmarchenko deleted the anmarchenko/git_search_commits branch April 5, 2024 15:29
@anmarchenko anmarchenko added this to the 1.0 milestone Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants