gitlab-plugin
gitlab-plugin copied to clipboard
Merge Requests from Forked Repositories cannot be updated due to permissions issues on the fork
Issue
The requests to update the merge request are using the source project ID. This is causing the calls to fail with a 403 error when the source repository (often a private fork) has not given permissions to the automation user.
It seems like the project id used for status updates should be the target project ID?
Context
- Gitlab plugin version: X.Y.Z
- Gitlab version: 11.6.11
- Jenkins version: 2.204.2
- Job type: Pipeline
Logs & Traces
Error: Failed to update Gitlab commit status for project '4633': HTTP 403 Forbidden (where 4633 is the fork)
For reference, this part of the code seems to specifically select the source project: OpenMergeRequestPushHookTriggerHandler.java
@markyjackson-taulia can give a help? gitlab api token have not permissions to update source repository commit status
Duplicate of #1151