-
Notifications
You must be signed in to change notification settings - Fork 466
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
Support https://docs.gitlab.com/api/jobs/#get-job-tokens-job in JobApi #1231
Comments
Fixes gitlab4j#1231
I added If you use the token-based auth, this correspond to:
I have a working example here: This is using jbang to run the script that is using the gitlab4j library. And this is the file for the pipeline definition: It worked well for me:
Do you need the variant with |
@jmini : No, we do not specifically need the variant with However, the code in your PR probably needs a lot of documentation (and/or better error messages) to clarify that to work, this requires a GitlabApi instance that has been created as in your example using Probably many users like us would have a "singleton" GitabApi instance in their system reused for all calls to Gitlab, but in this case this would not be viable. |
I have opened #1236 to add the method with the query parameter and I have integrated your feedback from the previous PR |
The actual gitlab v4 API allows to fetch jobs by token https://docs.gitlab.com/api/jobs/#get-job-tokens-job
But the Java API does not have any way to access that endpoint.
Implementation would be roughly:
However, we had trouble implementing it like this, because the authorization via the job_token and the authorization via the personal access token seemed to conflict with each other.
The text was updated successfully, but these errors were encountered: