# Outgoing webhooks: GitLab commit statuses

**URL:** <https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936>\
**Category:** Support\
**Tags:** ux, git\
**Created:** [May 17, 2019, 6:26am UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936 "2019-05-17T06:26:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rootkea](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/rootkea/32/738_2.png) [@rootkea](https://answers.netlify.com/u/rootkea)\
**Post date:** [May 17, 2019, 6:26am UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/1 "2019-05-17T06:26:01Z")

</div>

Hello!

I’ve set up [https://rootkea.me](https://rootkea.me) with Netlify whose repo is at [Avinash Sonawane / rootkea.gitlab.io · GitLab](https://gitlab.com/rootkea/rootkea.gitlab.io)

I’m trying to set up Gitlab commit statuses as outgoing webhooks explained here: [Deploy notifications | Netlify Docs](https://docs.netlify.com/site-deploys/notifications/#outgoing-webhooks-and-notifications)

1. It says “It requires a GitLab API token with access to the repository.”  
What kind of ‘access’ is required? While creating API token, Gitlab presents 5 different scopes: api, read\_user, read\_repository, write\_repository and read\_registry  
Which of these should be granted?

2. Where exactly these commit statuses can be seen?  
I created GitLab API token with read\_repository and write\_repository scopes and tried watching commit statuses at [Pipelines · Avinash Sonawane / rootkea.gitlab.io · GitLab](https://gitlab.com/rootkea/rootkea.gitlab.io/pipelines) but didn’t see any status.

Thanks!

---

<div class="post-metadata">

**Author:** ![rootkea](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/rootkea/32/738_2.png) [@rootkea](https://answers.netlify.com/u/rootkea)\
**Post date:** [May 20, 2019, 5:01pm UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/2 "2019-05-20T17:01:00Z")

</div>

CC @luke

Edit - removed other CCs

---

<div class="post-metadata">

**Author:** ![luke](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/luke/32/39_2.png) [@luke](https://answers.netlify.com/u/luke)\
**Post date:** [May 21, 2019, 5:08am UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/3 "2019-05-21T05:08:23Z")

</div>

Hi @rootkea. Would you please try making and API token with the scope of `api` (instead of `read_repository` and `write_repository`) and let us know if that works?

---

<div class="post-metadata">

**Author:** ![rootkea](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/rootkea/32/738_2.png) [@rootkea](https://answers.netlify.com/u/rootkea)\
**Post date:** [May 28, 2020, 10:55am UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/4 "2020-05-28T10:55:06Z")

</div>

3 Questions:

1. Is the meta scope `api` really necessary? Can’t it be restricted to `read_repository` and `write_repository` for Netlify deploy notifications as Gitlab commit status?

2. I created an access token with scope `api` and put it in API Access Token input box but when I select “Edit notification” to verify if the access token got saved properly or not it displays the blank box. How do I verify if the access token was saved or not?  

3. Where can I see these statuses? How do they look? Honestly, I have no idea. I already see “passed” and “failed” for Gitlab Pages and Vercel deploys (under the stage “external”) at [Pipelines · Avinash Sonawane / rootkea.gitlab.io · GitLab](https://gitlab.com/rootkea/rootkea.gitlab.io/pipelines)

Thanks!

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [June 1, 2020, 10:49pm UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/5 "2020-06-01T22:49:44Z")

</div>

Hi @rootkea,

Not sure why we need that scope since I didn’t write the code and cannot understand it easily, but it will be a change we won’t get to soon to modify it (if possible), so you’ll need to use what is already requested today if you want to use this feature today. If you can find some docs about what GitLab needs, I’ll be happy to file a feature request for us to reduce the scope!

We don’t show your access token in the UI, but if you saved it successfully, it is stored in our system.

Our intention is that you can see the statuses right on the MR. Something like this, though it may look a bit different these days since this is a very old commit on an old repo but is the only gitlab sample I have handy (for a build that failed):

 ![image](https://global.discourse-cdn.com/netlify/original/2X/f/fa4fac6541a0c19935066df9db6874fc0fc41161.png)

---

<div class="post-metadata">

**Author:** ![rootkea](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/rootkea/32/738_2.png) [@rootkea](https://answers.netlify.com/u/rootkea)\
**Post date:** [June 3, 2020, 5:28am UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/6 "2020-06-03T05:28:14Z")

</div>

> [@fool](#):
>
> If you can find some docs about what GitLab needs, I’ll be happy to file a feature request for us to reduce the scope!

I’m not sure which scope (with the least permissions but accomplishing the job) to use out of these 7 scopes. [Personal access tokens | GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#limiting-scopes-of-a-personal-access-token)

> [@fool](#):
>
> We don’t show your access token in the UI, but if you saved it successfully, it is stored in our system.

I’m wondering how’s this a good UI.

> [@fool](#):
>
> Our intention is that you can see the statuses right on the MR.

The documentation for Gitlab commit status notifications says nothing about the MR. It says “This type of notification creates commit statuses in your GitLab repositories.” [Deploy notifications | Netlify Docs](https://docs.netlify.com/site-deploys/notifications/#gitlab-commit-statuses)

No wonder I was looking for commit status notifications in repository (master branch) and not MRs.

> [@fool](#):
>
> Something like this
> 
> ![image](https://global.discourse-cdn.com/netlify/original/2X/f/fa4fac6541a0c19935066df9db6874fc0fc41161.png)

Thanks! I can see Netlify deploy notification on MR. Earlier I was looking in “repository” (master branch commits)

---

<div class="post-metadata">

**Author:** ![fool](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/fool/32/37_2.png) [@fool](https://answers.netlify.com/u/fool)\
**Post date:** [June 3, 2020, 7:59pm UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/7 "2020-06-03T19:59:04Z")

</div>

OK, my request to you was to determine the scope needed that would meet your desires, so I won’t be filing the feature request, but if you’d like to figure that out (since you are the first one to request a change), will be happy to do so in the future.

re: “good UI”, this is my understanding: since the token is associated with YOUR GitLab account, but your account teammates (maybe you don’t have any, but many people do) could see it - I think we made the decision to protect whomever set it up.

Finally re the confusing docs, I will work with the docs team to clarify that documentation, thanks so much for bringing it up!

---

<div class="post-metadata">

**Author:** ![rootkea](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/rootkea/32/738_2.png) [@rootkea](https://answers.netlify.com/u/rootkea)\
**Post date:** [June 4, 2020, 7:52am UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/9 "2020-06-04T07:52:32Z")

</div>

> [@fool](#):
>
> your account teammates (maybe you don’t have any, but many people do) could see it

Oh! That makes complete sense now. And yes, I don’t have any teammates so api token privacy didn’t occur to me. Thanks!

---

<div class="post-metadata">

**Author:** ![Scott](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/scott/32/26136_2.png) [@Scott](https://answers.netlify.com/u/Scott)\
**Post date:** [June 9, 2020, 1:59pm UTC](https://answers.netlify.com/t/outgoing-webhooks-gitlab-commit-statuses/936/12 "2020-06-09T13:59:39Z")

</div>

Hey @rootkea,

Thanks for the valuable feedback and for understanding the UI decisions. We’ve got some changes to our docs in the pipeline based on this so, again, thank you.
