-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Bitbucket is_first_time
can report incorrectly
#906
Comments
Duplicate, see #891 |
I was looking at that one, it could be duplicate, but i think the scenarios are slightly different: This one refers to commit in repo but not in the release effecting the users Where as I believe #891 is when a previous releases logs |
Hmm I see, I guess this one is also about using different branches and
This makes sense, however, we should look into other remotes (GitLab,GitHub,Gitea) to see if it is possible. Any ideas? |
Looks possible according to the various docs: I think they're all effected looking at the API documentation GitLab and GitHub is possible less obvious to users as it defaults to the default branch. GitHubLooks to default to the "default branch", but wouldn't work for users if they'd expect it to be running in different context.
https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-commits GitLabLooks to default to the "default branch", but wouldn't work for users if they'd expect it to be running in different context.
https://docs.gitlab.com/ee/api/commits.html#list-repository-commits GiteaNot entirely clear what the default behaviour is here from the documentation, but its either going to work like GitHub/GitLab or Bitbucket
https://docs.gitea.com/api/1.20/#tag/repository/operation/repoGetAllCommits BitbucketReturns all commits in the repo in topological order (newest commit first). All branches and tags are included (similar to git log --all).
Alternate endpoint might be better |
Thanks for investigating this further! Then I guess we can add a Would you be interested in working on this? My schedule is a bit tight these days (due to approaching EuroRust conference) so I might not get to it until next week. |
Yeah I'd be interested, I'll try have a look, I created the scenario in the test repo here:
|
Awesome |
Is there an existing issue for this?
Description of the bug
The Bitbucket first time does not report correctly when a user has made a commit in another as well as there first merged contribution.
We had a scenario where a first time contributor wasn't being reported in the change log. Looking into it the Commits API from bitbucket it returns all commits across all branches.
The user has also made another commit in another branch which was there first commit in the repo, but not there first commit on the branch being released.
Reference: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commits-get
Steps To Reproduce
git-cliff --current --context --bitbucket-repo "org/repo"
Expected behavior
The
is_first_time
value is updated based on users contributions to the current branch (not the repo).Screenshots / Logs
No response
Software information
Additional context
I guess the fix is to make the current branch context available in the
Remote
struct so it can be used in the API call.git-cliff/git-cliff-core/src/remote/bitbucket.rs
Lines 52 to 58 in 508a97e
The text was updated successfully, but these errors were encountered: