Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now

Add endpoints for "Repository" resource for job tokens

Background

With the recent rollout of granular permissions for job tokens, the next phase is to expand endpoint support for job tokens, so users do not have to rely on long-lived tokens.

Proposal

The scope of this issue is to:

  • Create a new resource "Repository" for job tokens
  • Add the following endpoints with read and write permissions.
  • Add the read/write dropdown for the FE.
Resource Action Endpoint Description
Repository Read GET /api/:version/projects/:id/repository/commits/:sha Get a specific commit identified by the commit hash or name of a branch or tag.
Repository Read GET /api/:version/projects/:id/repository/files/:file_path/raw Get raw file from repository
Repository Read GET /api/:version/projects/:id/repository/branches Get a list of repository branches from a project.
Repository Read GET /projects/:id/repository/commits/:sha/merge_requests Get a merge request that originally introduced a specific commit.
Repository Read GET /api/:version/projects/:id/repository/tags Get a list of repository tags from a project.
Edited Jul 23, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading