Skip to content

Commit b5bf629

Browse files
novalistimols
authored andcommitted
getMergeRequestApprovals: use projectId not targetProjectId (#258)
Make the getMergeRequestApprovals API consistent with notes api by looking at the projectId field instead of the targetProjectId field. For projects which are sourced from upstream, I believe that these will be the same (from reading the gitlab code -- the API docs are unclear; see https://gitlab.com/gitlab-org/gitlab-ce/issues/38539 ).
1 parent d5f26ee commit b5bf629

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/gitlab/api/GitlabAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ public List<GitlabMergeRequest> getAllMergeRequests(GitlabProject project) throw
10981098
* EE only.
10991099
*/
11001100
public GitlabMergeRequestApprovals getMergeRequestApprovals(GitlabMergeRequest mr) throws IOException {
1101-
String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(mr.getTargetProjectId()) +
1101+
String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(mr.getProjectId()) +
11021102
GitlabMergeRequest.URL + "/" + mr.getIid() + GitlabMergeRequestApprovals.URL;
11031103
return retrieve().to(tailUrl, GitlabMergeRequestApprovals.class);
11041104
}

0 commit comments

Comments
 (0)