Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Enhancement - make projects endpoints configurable #2028

Closed
wants to merge 1 commit into from

Conversation

kolluria
Copy link

@kolluria kolluria commented Oct 10, 2024

We have GitLab deployed on prem and the URLs are slightly different from what is mentioned in the API specification. For instance, to get a list of projects the user contributed to, instead of invoking https://gitlab.example.com/api/v4/users/5/contributed_projects we have to invoke https://gitlab.example.com/api/v4/users/5/contributed.

This change accommodates these discrepancies by exporting the endpoints so that users can configure then if they so need it.

@kolluria kolluria changed the title Enhancement - make user contributed projects endpoint configurable Enhancement - make user contributed projects endpoint configurable Oct 10, 2024
@kolluria kolluria force-pushed the enhance-user-cont-proj branch from 85380ae to 27d85f1 Compare October 10, 2024 08:50
@kolluria kolluria changed the title Enhancement - make user contributed projects endpoint configurable Enhancement - make projects endpoints configurable Oct 10, 2024
@svanharmelen
Copy link
Member

Hmm... Interesting. Are there any docs that explain why these differences exist and/or describe what differences exist for which endpoints? I.e. are these the only two endpoints that are different?

@kolluria
Copy link
Author

@svanharmelen I might have spoken too soon. I investigated further and turns out some specific endpoints are not working on our on prem deployment like /api/v4/users/5/contributed_projects. Let me probe further and see if this change even makes sense.

Thanks.

@kolluria
Copy link
Author

@svanharmelen we might be running an older version of GitLab. This is the output of the version endpoint -

gitlab.Version{Version:"15.11.13-ee", Revision:"c2a3ebb864f"}

Does any of the releases of this project support this version?
Your help is highly appreciated.

Thank you.

@svanharmelen
Copy link
Member

Searching through the project I see this was added about a year ago and has always used these paths: #1792 So if version 15.11 is older then a year, I guess not.

@RicePatrick
Copy link
Contributor

Yeah, 15.11 would have been about 1.5 years ago. The contributed_projects API was introduced in 16.2 (here: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124579), so I think you just need to update your gitlab version to take advantage of it via go-gitlab :)

@kolluria kolluria closed this Nov 6, 2024
@kolluria
Copy link
Author

kolluria commented Nov 6, 2024

Yeah, 15.11 would have been about 1.5 years ago. The contributed_projects API was introduced in 16.2 (here: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124579), so I think you just need to update your gitlab version to take advantage of it via go-gitlab :)

Unfortunately I don't know if that's gonna happen any time soon :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants