jenkinsci / jenkinsci/gitlab-plugin
%2F slash encoding issues
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
## Issue
### Context
- **Gitlab plugin version**: 1.3.0
- **Gitlab version**: 8.11.0
- **Jenkins version**: 2.7.2
### Logs & Traces
```
Aug 23, 2016 1:44:35 PM FINE com.dabsquared.gitlabjenkins.util.CommitStatusUpdater
Project (ns/projectname) and commit (f1660fef72200881a03187193d52ed18439e6ad1) combination not found
Aug 23, 2016 1:44:41 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving gitlab project ids
Aug 23, 2016 1:44:41 PM INFO com.dabsquared.gitlabjenkins.util.CommitStatusUpdater retrieveGitlabProjectIds
Retrieving the gitlab project id from remote url gitlab@scm.linova.de:ns/projectname.git
Aug 23, 2016 1:44:41 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder
Call GitLab:
HTTP method: GET
URL: https://scm.linova.de/api/v3/projects/ns%2Fprojectname/repository/commits/f1660fef72200881a03187193d52ed18439e6ad1
Request headers: [
Accept = [application/json],
Accept-Encoding = [gzip, deflate],
PRIVATE-TOKEN = [****FILTERED****]
]
Aug 23, 2016 1:44:41 PM FINEST com.dabsquared.gitlabjenkins.gitlab.GitLabClientBuilder
Got response from GitLab:
URL: https://scm.linova.de/api/v3/projects/ns%2Fprojectname/repository/commits/f1660fef72200881a03187193d52ed18439e6ad1
Status: 404 Not Found
Response headers: [
Connection = [Keep-Alive],
Content-Length = [363],
Content-Type = [text/html; charset=iso-8859-1],
Date = [Tue, 23 Aug 2016 13:44:41 GMT],
Keep-Alive = [timeout=5, max=100],
Server = [Apache/2.4.7 (Ubuntu)]
]
Response body:
404 Not Found
Not Found
The requested URL /api/v3/projects/ns/projectname/repository/commits/f1660fef72200881a03187193d52ed18439e6ad1 was not found on this server.
Apache/2.4.7 (Ubuntu) Server at scm.linova.de Port 443
Aug 23, 2016 1:44:41 PM FINE com.dabsquared.gitlabjenkins.util.CommitStatusUpdater
Project (ns/projectname) and commit (f1660fef72200881a03187193d52ed18439e6ad1) combination not found
```
### Problem description
The build does not update the commit build status on gitlab.
I figured out that the problem is, the following API call that fails:
`https://scm.linova.de/api/v3/projects/ns%2Fprojectname/repository/commits/f1660fef72200881a03187193d52ed18439e6ad1`
I tried to retrieve the commit information with curl and got error 404.
Instead of the ns/projectname part it should use the project ID (1 in my example code below) which did work when I made the call with curl:
`https://scm.linova.de/api/v3/projects/1/repository/commits/f1660fef72200881a03187193d52ed18439e6ad1`
Contributor guide
Assessment
This issue has not been assessed yet.