Skip to content

feat: add GitLab token support to avoid API rate limits#1011

Open
vuillaut wants to merge 10 commits into
KnowledgeCaptureAndDiscovery:devfrom
vuillaut:gitlab
Open

feat: add GitLab token support to avoid API rate limits#1011
vuillaut wants to merge 10 commits into
KnowledgeCaptureAndDiscovery:devfrom
vuillaut:gitlab

Conversation

@vuillaut

@vuillaut vuillaut commented Jun 4, 2026

Copy link
Copy Markdown

Adds gitlab_authorization parameter throughout the call chain. A single token works for gitlab.com and any self-hosted GitLab instance (salsa.debian.org, gitlab.in2p3.fr, etc.).
Three ways to provide the token (priority order):

  • somef describe --gitlab_token
  • SOMEF_GITLAB_TOKEN environment variable
  • somef configure (stored in ~/.somef/config.json)

@vuillaut vuillaut left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could test the feature on a private gitlab.in2p3.fr repository

If you would like an integration test, you will need to test with a gitlab repository where you can create a token and add it as github variable for the tests.

@dgarijo

dgarijo commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Thanks @vuillaut,

  • Can you please target the dev branch? That is the latest one.
  • Do we need to propagate the authorization to all the retriever methods? I think we can send the corresponding authorization based on whether we are on GitLab or GitHub. Maybe we can even read it directly from the configuration object when needed.

To be consistent, we should probably keep the third option only. It's the one we have for GitHub. But I like the first option too, so I am keen to keep that one.

@vuillaut vuillaut changed the base branch from master to dev June 4, 2026 20:52
@vuillaut

vuillaut commented Jun 4, 2026

Copy link
Copy Markdown
Author

You are absolutely right about the consistency, I should have looked more closely at this.

The authorization could be read from config indeed, that would simplify the code a lot. But to stay consitent, I would need to also simplify the github functions to not pass github auth and simply read it from config as well. Is that ok ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants