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

share your wildcard search #954

Open
tjommie opened this issue Nov 22, 2024 · 2 comments
Open

share your wildcard search #954

tjommie opened this issue Nov 22, 2024 · 2 comments

Comments

@tjommie
Copy link

tjommie commented Nov 22, 2024

I'm stumped with wildcard search from: https://github.com/mvisonneau/gitlab-ci-pipelines-exporter/blob/main/docs/configuration_syntax.md
See "Dynamically fetch projects to monitor using a wildcard" section.

Is this a regex? is there some special syntax?

Please share if you have a working version.

Currently my use-case is: I want to find all projects accessible to the group, but I want to either exclude one of more projects, or set a regex to match certain strings in the project name.

Could the gitlab token need to have some special scope or role for the wildcard and/or search to work?

@abrobi
Copy link

abrobi commented Nov 29, 2024

Hello,

I'm not able to use search from wildcard also.
Istead, I put all my projects on project:

projects:
#- # Name of the project (actually path with namespace) to fetch
# (required)

  • name: owner/project1
  • name: owner/project2
  • name: owner/project3
  • name: owner/project4
  • name: owner/project5

Regards,

@Sammyant
Copy link

Sammyant commented Jan 16, 2025

Hello, I was confused too, I tried a lot of variants of wildcard values, but got nothing
After investigating this issue I found, that the library which used by this exporter using api method
https://github.com/xanzy/go-gitlab/blob/68add0327e425160bc0933fb3fae4cdfaec950d5/projects.go#L390

which returns only personal projects according to docs of gitlab api
https://docs.gitlab.com/ee/api/projects.html#list-a-users-projects

Only the projects in the user’s (specified in user_id) namespace are returned. Projects owned by the user in any group or subgroups are not returned.

So if you created personal project for user - you will get a result for wildcard

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

No branches or pull requests

3 participants