Sign in

Delete repository file

documented

Delete a file from the repository.

DELETE /projects/:id/repository/files/:file_pathProjectsno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

Note: This command is based on GitLab's Repository files API. The endpoint is DELETE /projects/:id/repository/files/:file_path at https://gitlab.com/api/v4, and it requires branch and commit_message in the request. See GitLab Docs: Repository files API. ([docs.gitlab.com](https://docs.gitlab.com/api/repository_files/?utm_source=openai))
npx -y keychains@latest curl "https://gitlab.com/api/v4/projects/{{$id}}/repository/files/{{$file_path}}" \
  -X DELETE \
  -H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"branch": "{{$branch}}", "commit_message": "{{$commit_message}}", "author_email": "{{$author_email}}", "author_name": "{{$author_name}}", "last_commit_id": "{{$last_commit_id}}", "start_branch": "{{$start_branch}}"}'
Delete repository file · GitLab · OpenIntegrations