Skip to content

Support job token authentication for gitlab #1083

Description

@melcloud

Problem / Motivation
Currently, the gitlab.rs forge hard-coded the token header as PRIVATE-TOKEN. This is fine for project token and personal token. However, gitlab CI job token uses the header key JOB-TOKEN.

The job token can be used for release purposes since the new fine-grained control token allows read write for release creation

Proposed solution
Request to add a new settings like token_type in configuration to switch between PRIVATE-TOKEN and JOB-TOKEN header

Alternative solution considered
Could also interpret from environment variable name. If it is GITLAB_TOKEN, set to PRIVATE-TOKEN, if it is CI_JOB_TOKEN, set to JOB-TOKEN

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions