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

NPM option parsing improvements and documentation improvements #843

Merged
merged 4 commits into from
Sep 21, 2024

Conversation

favna
Copy link
Contributor

@favna favna commented Sep 7, 2024

Warning

This should be merged with "rebase & merge" to retain proper conventional commit history for the changelog generation

Description

Couple of changes bundled:

  • I got the request to implement skip-commit in cliff-jumper. Because the appropriate syntax for git-cliff is --skip-commit SHA --skip-commit SHA --skip-commit SHA --skip-commit SHA <options options> it is more ideal if the NodeJS code optionally takes an array of commits which can easily be parsed to CLI args in the library as opposed to janking something in cliff-jumper.
  • I noticed some options from https://git-cliff.org/docs/usage/args were missing in the Options type so I added them.
  • While doing the above I also decided to copy over all the descriptions for all the options to TSDoc comments so they are documented in the IntelliSense.
  • And while doing that I noticed that --gitea-repository mentioned GitLab and adjusted it accordingly.

Motivation and Context

As mentioned above, I got the request to implement --skip-commit in cliff-jumper and needed a change for that.

How Has This Been Tested?

I ran yarn build in npm/git-cliff then yarn pack to create a package.tgz which I then installed in cliff-jumper

This is when providing an array of strings:

ishare-1725700823

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.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.19%. Comparing base (08e761c) to head (db4db47).

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #843      +/-   ##
==========================================
+ Coverage   40.13%   40.19%   +0.07%     
==========================================
  Files          20       20              
  Lines        1645     1645              
==========================================
+ Hits          660      661       +1     
+ Misses        985      984       -1     
Flag Coverage Δ
unit-tests 40.19% <ø> (+0.07%) ⬆️

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.

Overall LGTM :)

npm/git-cliff/eslint.config.js Show resolved Hide resolved
@orhun orhun merged commit c41eacb into orhun:main Sep 21, 2024
60 checks passed
@favna favna deleted the feat/npm-option-improvements branch September 22, 2024 09:47
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