fix: use configured GitLab URL instead of hardcoded gitlab.com

The previous pagination implementation accidentally hardcoded the GitLab URL
to gitlab.com, breaking the integration for self-hosted GitLab instances.

Changes:
- Replace hardcoded 'https://gitlab.com' with gitlabProvider.gitlabUrl
- Maintains the pagination functionality added in previous commit

Fixes: GitLab branches API calls failing for self-hosted instances
This commit is contained in:
A-D-E
2025-08-05 21:31:15 +02:00
parent 2a14ae0c7f
commit 33873ce1e9

View File

@@ -316,7 +316,7 @@ export const getGitlabBranches = async (input: {
while (true) {
const branchesResponse = await fetch(
`https://gitlab.com/api/v4/projects/${input.id}/repository/branches?page=${page}&per_page=${perPage}`,
`${gitlabProvider.gitlabUrl}/api/v4/projects/${input.id}/repository/branches?page=${page}&per_page=${perPage}`,
{
headers: {
Authorization: `Bearer ${gitlabProvider.accessToken}`,