Search in sources :

Example 1 with Project

use of com.checkmarx.flow.dto.gitlab.Project in project cx-flow by checkmarx-ltd.

the class GitlabServiceMocker method sendPushEvent.

@Override
public void sendPushEvent() {
    PushEvent pushEvent = new PushEvent();
    pushEvent.setCommits(new LinkedList<>());
    Repository repo = new Repository();
    repo.setName(gitlabProjectName);
    pushEvent.setRepository(repo);
    pushEvent.setRef("refs/head/" + branchName);
    Project project = new Project();
    project.setGitHttpUrl(gitUrl);
    project.setNamespace(GITLAB_USER);
    project.setName(gitlabProjectName);
    pushEvent.setProject(project);
    ControllerRequest request = ControllerRequest.builder().application(gitlabProjectName).branch(Collections.singletonList(branchName)).project(cxProjectName).team(cxTeam).assignee("").preset("default").build();
    gitlabControllerSpy.pushRequest(pushEvent, "SIGNATURE", "CX", request);
}
Also used : Project(com.checkmarx.flow.dto.gitlab.Project) Repository(com.checkmarx.flow.dto.gitlab.Repository) PushEvent(com.checkmarx.flow.dto.gitlab.PushEvent) ControllerRequest(com.checkmarx.flow.dto.ControllerRequest)

Aggregations

ControllerRequest (com.checkmarx.flow.dto.ControllerRequest)1 Project (com.checkmarx.flow.dto.gitlab.Project)1 PushEvent (com.checkmarx.flow.dto.gitlab.PushEvent)1 Repository (com.checkmarx.flow.dto.gitlab.Repository)1