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(cli): introduce new --last flag, to stop recommending HEAD~1 #3916

Merged
merged 4 commits into from Mar 14, 2024

Conversation

knocte
Copy link
Contributor

@knocte knocte commented Feb 14, 2024

HEAD~1 is brittle because it would fail in single-commit scenarios.

Closes #3892

@knocte knocte mentioned this pull request Feb 14, 2024
7 tasks
@escapedcat
Copy link
Member

Sorry, would you rebase this? Then it can be merged

Mersho and others added 3 commits March 12, 2024 15:59
The upgrade of ES2017 to ES2022 is because of the use of
`Object.hasOwn` API which is less ugly than hardcoding
`undefined`.
In a single-commit repo, this would lead to this error:

```
Error: fatal: ambiguous argument 'HEAD~1..HEAD': unknown revision
or path not in the working tree.
```

Now that we have the `--last` flag, this should work for the case
in which we want just to analyze the last commit, not specify a
range of commits via `--from` and `--to`.

Closes conventional-changelog#3892
Copy link

codesandbox-ci bot commented Mar 13, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@knocte
Copy link
Contributor Author

knocte commented Mar 13, 2024

Sorry, would you rebase this? Then it can be merged

Done.

The latter adds unnecessary whitespace at the end of the commit
msg.
@escapedcat escapedcat merged commit 99f4f3f into conventional-changelog:master Mar 14, 2024
7 checks passed
@escapedcat
Copy link
Member

Thanks!

@escapedcat
Copy link
Member

travi added a commit to form8ion/commitlint-config that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants