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

BUG(?): commitDepth X gives you the first X commits, instead of the last X commits #805

Open
dansolhan opened this issue Nov 21, 2024 · 0 comments

Comments

@dansolhan
Copy link

Given a theoretical list of commits:

  • This is the first commit
  • This is the second commit
  • This is the third commit
  • This is the last commit

When using "commitDepth: 1", it seems that instead of getting the 1 latest commit, I get the first one.

Expected behaviour:
"commitDepth: 1" gives me: "This is the last commit"

Actual behaviour:
"commitDepth: 1" gives me: "This is the first commit"

Looking over this PR (https://github.com/wagoid/commitlint-github-action/pull/595/files) where the feature was implemented, it appears that it simply slices an array of commits (from, to), but my best guess is that the order of the original array was misunderstood to already be latest to earliest, rather than earliest to latest.

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

No branches or pull requests

1 participant