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

Specify GitLab branch #942

Open
1 task done
seanmil opened this issue Nov 4, 2024 · 2 comments
Open
1 task done

Specify GitLab branch #942

seanmil opened this issue Nov 4, 2024 · 2 comments
Labels
feature/request New feature or request integration Related to remote integration

Comments

@seanmil
Copy link

seanmil commented Nov 4, 2024

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

The API calls used for GitLab currently do not specify the branch - which means the default branch is always used. There should be a way (configuration setting and/or environment variable) which specifies which branch / reference should be used when looking for commits. This would allow GitLab metadata to be retrieved correctly if a changelog was being generated for a branch other than the GitLab default branch.

Desired solution

Provide a configuration option such as:

[remote.gitlab]
branch = "other_branch"

or an environment variable such as: GITLAB_BRANCH which, when specified, sets the ref_name parameter of the GitLab Commits API call which will return the commits specific to that branch instead of the default branch.

Alternatives considered

I don't believe there are any other viable alternatives, other than limiting GitLab-integrated changelog generation to only the default branch.

Additional context

Unlike the commits API call, the Merge Request list API call returns all project MRs regardless of branch. Thanks!

@seanmil seanmil added the feature/request New feature or request label Nov 4, 2024
Copy link

welcome bot commented Nov 4, 2024

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️

@orhun orhun added the integration Related to remote integration label Nov 19, 2024
@orhun orhun removed their assignment Nov 19, 2024
@orhun
Copy link
Owner

orhun commented Nov 19, 2024

Thanks for reporting! I agree that we should be able to specify the branch for the request. I'll look into this after the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request integration Related to remote integration
Projects
None yet
Development

No branches or pull requests

2 participants