What range of commits are looked at?
See original GitHub issueWe have a private repo so I can’t share it with you. But we have two active branches going. Every Friday (or Monday) I merge from v4
to v5
. Four weeks in a row this merge is failed due to the commitlint-github-action.
When I look at the details I see old commit messages that are not included in the current PR that are failing.
I would expect it to just be examining the handful of commits that are from v4
that are new to v5
and not older commit messages that were committed prior to our use of commitlint.
What data could I provide to help debug this issue?
this is our job definition (run on pull request):
jobs:
lint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
7.1 Git Tools - Revision Selection
Git allows you to refer to a single commit, set of commits, or range of commits in a number of ways. They aren't...
Read more >How do you review a range of commits in a Github pull request?
Click "files changed" · Review all files at once · Click on "all commits" · Select range of commits · View range of...
Read more >Way to compare range of commits in pull request on Github?
GitHub has a built-in way to do this. In the Files changed tab, click the "Changes from all commits" dropdown at the top...
Read more >View commits in a specific date range - Git - 30 seconds of code
Prints all commits in the specified date range. Use git log --since=<date-from> --until=<date-to> to view a log of all commits between ...
Read more >Solved: Can I compare a commit range in bitbucket like I c...
Solved: In Crucible you could drag a range between two commits in a code review. This was very useful, if you returned to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe for us, our solution is to exclude the target. Following the example from @michaelgwelch above, instead of
git log --first-parent v4ish...v5ish
, this would be more appropriate:git log --first-parent v4ish...v5ish ^v5ish
(exclude everything reachable from the target branch).I’m not sure if this change is applicable to all consumers of this action…mainly those that use feature/topic branches for development which I believe your action was originally intending for @wagoid. Off hand and without diving deeper
git log
or testing it, I don’t know if adding^target
to always be used would have any negative effects.Maybe this action can support a more advanced configuration option for additional log arguments?
@wagoid Yeah, we can’t rebase as both
v4
andv5
are “released”. So we can’t be changing history onv5
to incorporatev4
changes into it.Sorry I didn’t get to this sooner with the repo. Putting it on my TODO for today.