-
Notifications
You must be signed in to change notification settings - Fork 101
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
cli: Allow for a single commit in the --commits cmd-line param #412
Conversation
Thanks for the PR - makes sense 👍 Still needs docs and a unit test (I can take care of that for you if you want). |
Let me give it a go. If I get stuck I will let you know. Thanks! |
In order to avoid applications needing to select between `--commit` and `--commits` based on the number of commits, allow for providing a single commit with `--commits` in the format: $ gitlint --commits <sha>, The trailing comma ensures that gitlint knows this is a commit list and not a refspec. Signed-off-by: Carles Cufi <[email protected]>
d426a9a
to
4d30d46
Compare
@jorisroovers done, please take another look. Thanks! |
fixup! [nrf noup] ci: NCS-specific CI tweaks When merging a single commit we should be using "--commit" option of gitlint as per [1] from 0.9.0 "--commits" doesn't work for single commit causing gitlint to lint all commits in the repo. FYI, [2] fixes this issue, but it is not merged yet. [1] - https://github.com/jorisroovers/gitlint/blob/main/CHANGELOG.md#v090-2017-12-03 [2] - jorisroovers/gitlint#412 Signed-off-by: Krishna T <[email protected]>
fixup! [nrf noup] ci: NCS-specific CI tweaks When merging a single commit we should be using "--commit" option of gitlint as per [1] from 0.9.0 "--commits" doesn't work for single commit causing gitlint to lint all commits in the repo. FYI, [2] fixes this issue, but it is not merged yet. [1] - https://github.com/jorisroovers/gitlint/blob/main/CHANGELOG.md#v090-2017-12-03 [2] - jorisroovers/gitlint#412 Signed-off-by: Krishna T <[email protected]>
Tested locally, works well! Merging 👍 |
Thanks for the speedy review and merging! |
fixup! [nrf noup] ci: NCS-specific CI tweaks When merging a single commit we should be using "--commit" option of gitlint as per [1] from 0.9.0 "--commits" doesn't work for single commit causing gitlint to lint all commits in the repo. FYI, [2] fixes this issue, but it is not merged yet. [1] - https://github.com/jorisroovers/gitlint/blob/main/CHANGELOG.md#v090-2017-12-03 [2] - jorisroovers/gitlint#412 Signed-off-by: Krishna T <[email protected]>
This release was primarily focussed on modernizing gitlint's build and test tooling (details: #378). General Python 3.6 no longer supported (EOL since 2021-12-23) (#379) This is the last release to support the sh library (used under-the-hood to execute git commands) by setting GITLINT_USE_SH_LIB=1. This is already disabled by default since v0.18.0. Features Allow for a single commit in the --commits cmd-line param (#412) Gitlint now separates FILE_ENCODING (always UTF-8) from TERMINAL_ENCODING (terminal dependent), this should improve issues with unicode. Use gitlint --debug to inspect these values. (#424) Bugfixes ignore-by-author-name crashes without --staged (#445) Various documentation fixes (#401, #433) - Thanks scop Development Adopted hatch for project management (#384). This significantly improves the developer workflow, please read the updated CONTRIBUTING page. Adopted ruff for linting, replacing pylint (#404) Gitlint now publishes dev builds on every commit to main (#429) Gitlint now publishes a latest_dev docker image on every commit to main (#451) (#452) Dependencies updated Many improvements to the CI/CD worfklows Improve unit test coverage (#453) Integration test fixes on windows (#392, #397) Devcontainer improvements (#428) Removal of Dockerfile.dev (#390) Fix most integration tests on Windows Fix Windows unit tests (#383) Introduce a gate/check GHA job (#375) Full Release details in CHANGELOG.md.
This release was primarily focussed on modernizing gitlint's build and test tooling (details: #378). General Python 3.6 no longer supported (EOL since 2021-12-23) (#379) This is the last release to support the sh library (used under-the-hood to execute git commands) by setting GITLINT_USE_SH_LIB=1. This is already disabled by default since v0.18.0. Features Allow for a single commit in the --commits cmd-line param (#412) Gitlint now separates FILE_ENCODING (always UTF-8) from TERMINAL_ENCODING (terminal dependent), this should improve issues with unicode. Use gitlint --debug to inspect these values. (#424) Bugfixes ignore-by-author-name crashes without --staged (#445) Various documentation fixes (#401, #433) - Thanks scop Development Adopted hatch for project management (#384). This significantly improves the developer workflow, please read the updated CONTRIBUTING page. Adopted ruff for linting, replacing pylint (#404) Gitlint now publishes dev builds on every commit to main (#429) Gitlint now publishes a latest_dev docker image on every commit to main (#451) (#452) Dependencies updated Many improvements to the CI/CD worfklows Improve unit test coverage (#453) Integration test fixes on windows (#392, #397) Devcontainer improvements (#428) Removal of Dockerfile.dev (#390) Fix most integration tests on Windows Fix Windows unit tests (#383) Introduce a gate/check GHA job (#375) Full Release details in CHANGELOG.md.
fixup! [nrf noup] ci: NCS-specific CI tweaks Now that gitlint supports --commits with a single commit natively, remove the extra logic. jorisroovers/gitlint#412 Signed-off-by: Carles Cufi <[email protected]>
fixup! [nrf noup] ci: NCS-specific CI tweaks - Now that gitlint supports --commits with a single commit natively, remove the extra logic: jorisroovers/gitlint#412 - Fix gitlint ncs extension matching logic: the group was wrong (group 1 is the Revert, group 2 is the actual sauce tag). Signed-off-by: Carles Cufi <[email protected]>
fixup! [nrf noup] ci: NCS-specific CI tweaks - Now that gitlint supports --commits with a single commit natively, remove the extra logic: jorisroovers/gitlint#412 - Fix gitlint ncs extension matching logic: the group was wrong (group 1 is the Revert, group 2 is the actual sauce tag). Signed-off-by: Carles Cufi <[email protected]>
In order to avoid applications needing to select between
--commit
and--commits
based on the number of commits, allow for providing a single commit with--commits
in the format:The trailing comma ensures that gitlint knows this is a commit list and not a refspec.
Signed-off-by: Carles Cufi [email protected]