Questions tagged [gitlab-api]

The GitLab API is the api for the GitLab Community Edition.

The GitLab API is the for the GitLab Community Edition, which is hosted on github. See for more information on GitLab.

The GitLab API offers numerous access and management resources, including the most common needed for effective :

Additional API resources are available to provide a rich source control environment. Full documentation can also be found in the GitLab API github repository.

663 questions
2
votes
1 answer

Gitlab CI/CD: use multiple when conditions

I have like this gitlab ci cd configuration file: image: docker:git stages: - develop - production default: before_script: - apk update && apk upgrade && apk add git curl deploy: stage: develop script: - echo "Hello…
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125
2
votes
2 answers

How to prevent CI/CD to be triggered when creating a tag or release via the API

I have enabled automatic release generation via the GitLab CI/CD. I am using something like this: curl --header "Content-Type: application/json" --header "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" \ --data "{ \ \"name\": \"$GV_SEMVER\", \ …
Ramon de Klein
  • 5,172
  • 2
  • 41
  • 64
2
votes
1 answer

Accessing Merge Settings via the GitLab API

I would like to view and perhaps change the merge settings in GitLab (see the screenshot). How do I do this via the API?
csgillespie
  • 59,189
  • 14
  • 150
  • 185
2
votes
2 answers

Is there a way to export GitLab Merge requests + comments in CSV file

In my organization, we are using a free version of GitLab - I wanted to know If there is a way to export GitLab Merge requests + comments in a CSV file Looking for help!!
Chandler
  • 23
  • 1
  • 6
2
votes
1 answer

Trigger a specific stage from a GitLab pipeline with another GitLab pipeline

I need to specify the stage instead of triggering the whole thing. This is how it's currently configured. stage: bridge trigger: project: user/project2 branch: master strategy: depend
2
votes
1 answer

How to get the job artifacts of a child pipeline with GitLab API?

job 1 ________ child-pipeline ________ job 3 (x) / \ job 2 __/ \___ job 4 I'm trying to reach the artifact of job 3. Here is where I reached so far: I need the ID of the job 3 according to the…
Sevil Yilmaz
  • 103
  • 1
  • 10
2
votes
1 answer

How to trigger a GitLab pipeline for a tagged commit on branch master?

I wanna trigger pipelines once I push tagged commits to branch master. Although, I'm not sure if it works, since I have had no success so far. .gitlab-ci.yml: variables: JEKYLL_ENV: production LC_ALL: C.UTF-8 stages: - publish - release #…
jurordrained
  • 131
  • 2
  • 9
2
votes
3 answers

Get à 401 Unauthorized when trying to lint my gitlab-ci.yml (version 13.8)

Since monday, I'm not able to use the lint CI API from gitlab, which is documented here https://docs.gitlab.com/ee/api/lint.html#validate-the-ci-yaml-configuration I'm working on a self hosted gitlab, and we updated gitlab to the last version…
Tako
  • 661
  • 12
  • 34
2
votes
2 answers

How to POST a note to an Issue and close this issue

I found an issue and get it's details with: GET https://localhost/api/v4/projects/2779/issues/2 I can add a new_comment to the issue by: POST https://localhost/api/v4/projects/2779/issues/2/notes?body=new_comment how to close this issue at once with…
simoN
  • 65
  • 2
  • 12
2
votes
2 answers

How to create a gitlab login button to allow the client app create repositories, make commits and pull request for the user?

I would like that the users of my app can login through the gitlab without the user need configurate nothing, like many apps of the web, you only click in allow and is logged. Because I need use the gitlab api to create repositories, make commits,…
PerduGames
  • 1,108
  • 8
  • 19
2
votes
0 answers

How to create Gitlab issue from Redmine

Is that possible to create a new Gitlab issue from Redmine? I meant when we create a Redmine issue it will automatically create an issue in Gitlab. So in this case, our client will create an issue from Redmine and that issue will be handle with our…
2
votes
1 answer

Importing git bundle into gitlab

I've created a git bundle out of my repo and I'm trying to import it to gitlab. I've tried the API via curl command which gives me the error Error importing repository into root/api-project - No such file or directory @ rb_sysopen - [FILTERED] and…
2
votes
2 answers

How to add label when merge request is created on gitlab?

I would like to add label "foo" once merge request is created. How can I do it? If not possible via gitlab gui (using some robot) it is possible via gitlab api?
nirebam368
  • 245
  • 4
  • 11
2
votes
1 answer

In GitLab API, how do I set merge commit message for merge requests?

I have a few different CI/CD flows, one of them automatically creates GitLab merge requests for specific branches. Each merge request has a generated description and title, with links to resolved issues, etc. After merge request is merged, GitLab…
2
votes
0 answers

GitLab Multiple Project CI setup

I have a codebase that spans multiple repositories with hierarchical dependencies between them. When a breaking change goes into a dependency, it will break the CI for dependent projects. One way that we attempted to address this is to allow…
Gregory
  • 1,205
  • 10
  • 17