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(args): set CHANGELOG.md as default missing value for output option #354

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

sh-cho
Copy link
Contributor

@sh-cho sh-cho commented Nov 19, 2023

Closes #352

Description

$ git cliff # outputs to stdout

$ git cliff -o # outputs to CHANGELOG.md

$ git cliff -o OTHER_FILE.md # outputs to another file

If -o is given and output path is omitted, output to CHANGELOG.md

For output argument, I set num_args to 0..=1 and default_missing_value to CHANGELOG.md.

Motivation and Context

How Has This Been Tested?

I builded locally and tested with commands like below,

$ cargo build --release
$ target/release/git-cliff                   # printed via console
$ target/release/git-cliff -o                # CHANGELOG.md is generated
$ target/release/git-cliff -o -c cliff.toml  # CHANGELOG.md is generated
$ target/release/git-cliff -o ABC.md         # ABC.md is generated

Screenshots / Logs (if applicable)

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.

Well.. I started to study Rust for the first time a few hours ago 😂

@sh-cho sh-cho requested a review from orhun as a code owner November 19, 2023 14:23
Copy link

welcome bot commented Nov 19, 2023

Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️

@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8edec7f) 44.43% compared to head (64219b0) 44.43%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #354   +/-   ##
=======================================
  Coverage   44.43%   44.43%           
=======================================
  Files          13       13           
  Lines         628      628           
=======================================
  Hits          279      279           
  Misses        349      349           
Flag Coverage Δ
unit-tests 44.43% <ø> (ø)

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.

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.

Lovely, thanks for your contribution! 💖

@orhun orhun merged commit 04d149e into orhun:main Nov 22, 2023
23 of 24 checks passed
Copy link

welcome bot commented Nov 22, 2023

Congrats on merging your first pull request! ⛰️

@sh-cho sh-cho deleted the default-output branch November 23, 2023 01:32
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.

Set default output as CHANGELOG.md
3 participants