Hello,
A few gitlab versions back, the temporary CI_JOB_TOKEN
available in Gitlab CI jobs had some permissions on the Notes API
to be able to send comments on Merge Requests.
This use-case was very useful for custom integrations. Indeed, in many cases CI automation can help to provide developers automatic comments on their MR to get more context (e.g. get a link to an external service, get summarized changelog information, get stats on their MR changes…). There are some other open topics which asks for the same thing (e.g. here and here).
I didn’t find which Gitlab version removed the permission to the CI job token on the Notes API but it was really useful. Also I believe using a PAT (or project token) isn’t recommended as those are not ephemeral as opposed to the CI job tokens.
Could someone from the Gitlab team give some hints on how to build custom integrations with Gitlab CI workflows to be able to send Merge Requests comments automatically via a CI job?
Thanks a lot,
Paul