semantic-release / semantic-release/gitlab
Support `CI_JOB_TOKEN` auth
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 344
- Forks
- 89
- Avg merge
- 16h 11m
- Merged PRs (30d)
- 4
Description
GitLab CI injects CI_JOB_TOKEN to allow a pipeline job to access a project resource through public v4 API. Not all of APIs support job token auth, however, release creation API is already supported. So in theory, executing GITLAB_TOKEN=$CI_JOB_TOKEN should be suffice to run semantic-release.
However, as I tested https://gitlab.com/dosuken123/semantic-release-test/-/jobs/628942282, it didn't succeed as semantic-release tried remote Git repository authentication. I'm not sure why it's necessary as the tag creation is done via the above API call.
If CI_JOB_TOKEN auth is possible, it's very convenient to run semantic-release in GitLab CI as users don't need to create PAT.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GitLab release creation API and the remote Git repository authentication flow described in the issue. Trace why semantic-release performs remote authentication when using CI_JOB_TOKEN, then verify the behavior in the linked GitLab CI example. Done means a pipeline can create a release with CI_JOB_TOKEN without requiring a personal access token.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, gitlab, javascript
- Domain
- api, authentication, devops, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100