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

feat!: Use locally installed git to determine file changes. #1596

Merged
merged 29 commits into from
Feb 29, 2024
Merged

Conversation

Jason3S
Copy link
Contributor

@Jason3S Jason3S commented Feb 27, 2024

This action was using the GitHub api to determine the list of files that were changed. This was both slow and used up API requests.

The action now depends upon a locally installed version of git.

To get the list of changed files, it uses:

git rev-list HEAD -<number of commits>
git fetch --deepen=<number of commits>
git diff-tree --no-commit-id --name-only -r "<sha1>" "<sha2>"

Note: this is only used when incremental_files_only: true.

@coveralls
Copy link

coveralls commented Feb 27, 2024

Pull Request Test Coverage Report for Build 8097661087

Details

  • 59 of 62 (95.16%) changed or added relevant lines in 4 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-2.1%) to 90.191%

Changes Missing Coverage Covered Lines Changed/Added Lines %
action-src/src/git.ts 42 45 93.33%
Files with Coverage Reduction New Missed Lines %
action-src/src/error.ts 1 92.86%
action-src/src/main.ts 3 40.0%
Totals Coverage Status
Change from base Build 8066528095: -2.1%
Covered Lines: 227
Relevant Lines: 239

💛 - Coveralls

@Jason3S Jason3S changed the title chore: understand github events feat!: Use locally installed git to determine file changes. Feb 29, 2024
@Jason3S Jason3S merged commit 5d97173 into main Feb 29, 2024
17 checks passed
@Jason3S Jason3S deleted the dev-git branch February 29, 2024 14:34
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.

2 participants