Skip to content

Using wrong names for parameters (mergeRequestIid named mergeRequestId) #299

@tomasbjerre

Description

@tomasbjerre

Problem

The GitLabAPI uses name mergeRequestId where it should be using name mergeRequestIid.

https://github.com/timols/java-gitlab-api/blob/master/src/main/java/org/gitlab/api/GitlabAPI.java#L1482

    public GitlabMergeRequest getMergeRequestChanges(Serializable projectId, Integer mergeRequestId) throws IOException {
        String tailUrl = GitlabProject.URL + "/" + sanitizeProjectId(projectId) + GitlabMergeRequest.URL + "/" + mergeRequestId + "/changes";
        return retrieve().to(tailUrl, GitlabMergeRequest.class);
    }

Here is the docs:
https://docs.gitlab.com/ee/api/merge_requests.html#get-single-mr-changes

Proposed solution

This single case could, of course, be changed quickly with a PR. But it would break the API. If the next version will break the API, then maby it is good to go through all the calls and try to find more faulty names. Instead of breaking the API repeatedly in a series of versions. But this is just me assuming there are more faulty names to fix =)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions