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: add setup subcommand to automate prepare-commit-msg githook setup #58

Merged
merged 7 commits into from
Apr 7, 2024

Conversation

Mubashwer
Copy link
Owner

@Mubashwer Mubashwer commented Apr 7, 2024

Changes

  • Add git mob setup --global command to automate the setup of prepare-commit-msg global githook which will append Co-authored-by trailers to the commit msg

  • Add git mob setup --local command to set up local prepare-commit-msg githook which invokes the global one. This is for some repos ovreride local core.hooksPath git config variable (e.g when using husky). Global githook will not work

  • Comment-out adding of JIRA prefix to commit messages in prepare-commist-msg global githook

  • Update README with instructions for automatic setup

    • Add separate documentation for manual setup
  • Updates typos and mistakes in the CLI help information

  • Fix some pre-existing Clippy warnings

  • Replace grcov with cargo-llvm-cov to generate test coverage

    • The test coverage was incorrectly 1% for src/commands/setup.rs with grcov
    • The trade-off is that unit tests are included in code coverage - will try fix it in a separate change

Automate the setup of prepare-commit-msg githook
which will append Co-authored-by trailers to the commit msg

Updates typos and mistakes in the CLI help information
Also add additional test for prepare-commit-msg local hook
Extract and update manual setup documentation
Make setup integration tests work on windows

This is testable on windows because it looks for USERPROFILE env first
before invoking the SHGetKnownFolderPath function with FOLDERID_Profile
@Mubashwer Mubashwer changed the title feat: add setup subcommand to automate prepare-commit-msg githook setup feat: add setup subcommand to automate prepare-commit-msg githook setup Apr 7, 2024
Repository owner deleted a comment from codecov bot Apr 7, 2024
Repository owner deleted a comment from codecov bot Apr 7, 2024
Mubashwer added a commit that referenced this pull request Apr 7, 2024
CARGO_INCREMENTAL=0 was producing incorrect test coverage
for setup.rs in #58
Repository owner deleted a comment from codecov bot Apr 7, 2024
@Mubashwer Mubashwer force-pushed the setup-cmd branch 2 times, most recently from 2c1d4c2 to 233404a Compare April 7, 2024 13:53
@Mubashwer
Copy link
Owner Author

Mubashwer commented Apr 7, 2024

It looks like there is a bug with the way the coverage for src/commands/setup.rs is generated. Its incorrectly 1%

Use cargo-llvm-cov instead of grcov

The trade-off is that this will count unit tests as part of coverage at this moment
Repository owner deleted a comment from codecov bot Apr 7, 2024
@Mubashwer Mubashwer merged commit 8077a21 into main Apr 7, 2024
5 checks passed
@Mubashwer Mubashwer deleted the setup-cmd branch April 23, 2024 17:07
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.

1 participant