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

Improve the monorepo support #976

Merged
merged 3 commits into from
Dec 9, 2024
Merged

Improve the monorepo support #976

merged 3 commits into from
Dec 9, 2024

Conversation

orhun
Copy link
Owner

@orhun orhun commented Dec 4, 2024

Description

This PR simplifies the following command:

cd packages/some_library
git cliff --include-path "packages/some_library/**/*" --repository "../../"

To:

cd packages/some_library
git cliff

When --include-path is not provided, git-cliff will automatically include the current directory and its subdirectories.

Also, the default configuration file (cliff.toml) is now automatically discovered when running git-cliff in a subdirectory of the repository.

For example, if you run from a subdirectory:

$ cd ratatui/ratatui-crossterm

$ git cliff

 INFO  git_cliff > Using configuration from parent directory: /home/orhun/gh/ratatui/cliff.toml
 INFO  git_cliff > Including changes from the current directory: "ratatui-crossterm"

Motivation and Context

See #969

How Has This Been Tested?

Locally.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@orhun orhun mentioned this pull request Dec 4, 2024
1 task
@orhun
Copy link
Owner Author

orhun commented Dec 4, 2024

TODO: add a fixture test for this

@orhun orhun force-pushed the feat/improve_monorepo_support branch from 2ad2057 to 099ec43 Compare December 4, 2024 17:56
@codecov-commenter
Copy link

codecov-commenter commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 24 lines in your changes missing coverage. Please review.

Project coverage is 42.80%. Comparing base (e8976fe) to head (85c4e9b).

Files with missing lines Patch % Lines
git-cliff/src/lib.rs 0.00% 19 Missing ⚠️
git-cliff-core/src/repo.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #976      +/-   ##
==========================================
- Coverage   43.35%   42.80%   -0.54%     
==========================================
  Files          21       21              
  Lines        1712     1734      +22     
==========================================
  Hits          742      742              
- Misses        970      992      +22     
Flag Coverage Δ
unit-tests 42.80% <0.00%> (-0.54%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@orhun orhun force-pushed the feat/improve_monorepo_support branch from 099ec43 to de90227 Compare December 9, 2024 17:22
@orhun orhun force-pushed the feat/improve_monorepo_support branch from 417b617 to 85c4e9b Compare December 9, 2024 17:47
@orhun orhun merged commit e85888f into main Dec 9, 2024
68 checks passed
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