Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve status update issue for GitLab instances with relative paths
Issue: For GitLab instances hosted under a relative path (e.g., https://example.servehttp.com/gitlab), status updates on MR fail to propagate correctly. Although initial events like Repository CR creation, starting PipelineRuns based on webhooks from GitLab, reporting status on Pipeline start works fine. subsequent updates (e.g., marking the PipelineRun as Finished) do not reflect in GitLab, leaving the status stuck on Running state. Root Cause: When we have /gitlab relative path in the API we are getting the wrong organization info because there is a function which get Organization and Repository info again from URL so for a GitLab API https://example.servehttp.com/gitlab/root/testpac initially Organization and Repository value from GitLab coming as root and testpac But later in the event.go file we are refetching Organization and Repository from event.URL because of that Organization is coming as gitlab/root and Repository as testpac. that's why getting project info api call ex: (https://example.servehttp.com/gitlab/api/v4/projects/gitlab/root/testpac) is failing with 404 error With this PR changes now status is getting updated successfully. Signed-off-by: savitaashture <sashture@redhat.com>
- Loading branch information