Skip to content

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

@dansolhan

Description

@dansolhan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions