Skip to content

Add Hook doesn't create issue event #394

@baymac

Description

@baymac
gitLabApi.getProjectApi().addHook(project, "https://example.com", true, true,true);

The above code should register webhook with mergeEvents, pushEvents and IssueEvents. But the issueEvents is not registered and only the other 2 events are registered.

In gitlab4j, the addHook method looks like this:

public ProjectHook addHook(Object projectIdOrPath, String url, boolean doPushEvents,
            boolean doIssuesEvents, boolean doMergeRequestsEvents) throws GitLabApiException {
        GitLabApiForm formData = new GitLabApiForm()
                .withParam("url", url)
                .withParam("push_events", doPushEvents)
                .withParam("issues_enabled", doIssuesEvents)
                .withParam("merge_requests_events", doMergeRequestsEvents);

        Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "hooks");
        return (response.readEntity(ProjectHook.class));
    }

I think it should be "issues_events instead of issues_enabled.

Btw what is the purpose of issues_enabled param?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions