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(config): changelog for the last n commits #116

Merged
merged 2 commits into from
Oct 6, 2022

Conversation

FlrnFrmm
Copy link
Contributor

@FlrnFrmm FlrnFrmm commented Oct 3, 2022

Description

Adds an additional configuration variable limit_commits to the configuration struct.
limit_commits can be set to a positive integer number to limit the commits contained in the generated changelog.
Also adjusts the default config file to contain limit_commits as a commented-out line.
Extends documentation in README.md to also cover the introduced configuration value.

Motivation and Context

A possible solution for #102

How Has This Been Tested?

Locally with the configuration file examples/limitedcommits.toml (added with this PR) and a local git repository.

Screenshots / Output (if appropriate):

image

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 added tests to cover my changes.
  • All new and existing tests passed.

@FlrnFrmm FlrnFrmm requested a review from orhun as a code owner October 3, 2022 20:36
@FlrnFrmm FlrnFrmm force-pushed the changelog_for_the_last_n_commits branch from 66948b4 to c52cd49 Compare October 3, 2022 20:51
@FlrnFrmm FlrnFrmm changed the title feat: changelog for the last n commits feat(config): changelog for the last n commits Oct 3, 2022
@codecov-commenter
Copy link

Codecov Report

Base: 64.06% // Head: 63.81% // Decreases project coverage by -0.25% ⚠️

Coverage data is based on head (c52cd49) compared to base (f9d4b88).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- Coverage   64.06%   63.81%   -0.24%     
==========================================
  Files          14       14              
  Lines         790      793       +3     
==========================================
  Hits          506      506              
- Misses        284      287       +3     
Flag Coverage Δ
unit-tests 63.81% <0.00%> (-0.24%) ⬇️

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

Impacted Files Coverage Δ
git-cliff-core/src/config.rs 60.00% <ø> (ø)
git-cliff-core/tests/integration_test.rs 100.00% <ø> (ø)
git-cliff/src/changelog.rs 71.17% <ø> (ø)
git-cliff/src/lib.rs 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! Only needs a few edits, see my comments 🐻

Apart from those, I will be doing the following:

  • Mention the limitedcommits.toml example in README.md
  • Add test fixtures

Feel free to tackle these too if you'd like!

git-cliff/src/lib.rs Outdated Show resolved Hide resolved
config/cliff.toml Outdated Show resolved Hide resolved
git-cliff-core/src/config.rs Outdated Show resolved Hide resolved
examples/limitedcommits.toml Outdated Show resolved Hide resolved
@orhun
Copy link
Owner

orhun commented Oct 5, 2022

Ah, can you also merge main and resolve conflicts?

@FlrnFrmm FlrnFrmm force-pushed the changelog_for_the_last_n_commits branch 2 times, most recently from 45ff563 to 5e6092c Compare October 5, 2022 20:40
@FlrnFrmm
Copy link
Contributor Author

FlrnFrmm commented Oct 5, 2022

Ah, can you also merge main and resolve conflicts?

Done 👍

@FlrnFrmm FlrnFrmm force-pushed the changelog_for_the_last_n_commits branch from 5e6092c to 6f94622 Compare October 5, 2022 21:27
@FlrnFrmm
Copy link
Contributor Author

FlrnFrmm commented Oct 5, 2022

Looks great, thanks! Only needs a few edits, see my comments bear

Apart from those, I will be doing the following:

  • Mention the limitedcommits.toml example in README.md
  • Add test fixtures

Feel free to tackle these too if you'd like!

Added it to the README.md.

Was not sure where to find the test fixtures and what to do there 😞

Adds a additional configuration variable `limit_commits` to the
configuration struct.
`limit_commits` can be set to a positive integer number to limit the
commits contained in the generated changelog.

Also adjusts the default config file to contain `limit_commits` as a
commented out line.

Extends documentation in README.md to also cover the introduced
configuration value.

issue: orhun#102
@FlrnFrmm FlrnFrmm force-pushed the changelog_for_the_last_n_commits branch from 6f94622 to 6f8298a Compare October 5, 2022 21:35
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for your contribution! 🐻

@orhun orhun merged commit 0c7769b into orhun:main Oct 6, 2022
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