-
-
Notifications
You must be signed in to change notification settings - Fork 264
Fetch commits from non-default branches using remotes #1086
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
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1086 +/- ##
==========================================
- Coverage 41.48% 41.09% -0.38%
==========================================
Files 21 21
Lines 1823 1845 +22
==========================================
+ Hits 756 758 +2
- Misses 1067 1087 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
orhun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! Just left some comments @william-stacken
Would be also nice to add a fixture test for this, e.g. c/p from this one to verify the behavior.
|
Thanks @orhun!
Have added fixure tests now |
orhun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for adding the fixtures! Only had some comments about naming etc
orhun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I had some cleanup suggestions (unfortunately I can't push to your branch)
.github/fixtures/test-bitbucket-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-bitbucket-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-gitea-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-gitea-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-github-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-github-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-gitlab-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-gitlab-integration-custom-range/cliff.toml
Outdated
Show resolved
Hide resolved
.github/fixtures/test-bitbucket-integration-custom-range/expected.md
Outdated
Show resolved
Hide resolved
.github/fixtures/test-gitea-integration-custom-range/expected.md
Outdated
Show resolved
Hide resolved
orhun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛰
|
Congrats on merging your first pull request! ⛰️ |
Description
This PR adds the ability to make use of a query param to a remote API, to fetch commits from non-default branches. The query param is derived from the commit range given to git cliff. For example, if the range is
v1.0..v1.1, then the param becomesv1.1. If the range isv1.0..HEAD, then the query param is omitted and the default branch is used, as before.Motivation and Context
Allows git cliff to support trunk-based workflows, meaning that release notes will be correctly generated from hotfix branches that are not indented to be merged into the deefault branch.
Fixes #1050
How Has This Been Tested?
I ran
git-cliff prevtag..hotfixtag --config cliff.toml --tag hotfixtag --github-repo my-org/my-private-repo, before and after applying these changes. I got the expected output with these changes, and got no output without them.I am not able to test the non-GitHub remotes, but I found the equivalent query parameters in their respective docs
gitlab
gitea
bitbucket
Screenshots / Logs (if applicable)
Types of Changes
Checklist: