-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix filtering by label never matches anything #647
- Loading branch information
1 parent
e022274
commit a8ce097
Showing
5 changed files
with
219 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
173 changes: 173 additions & 0 deletions
173
src/main/java/com/dabsquared/gitlabjenkins/gitlab/hook/model/MergeRequestLabel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
package com.dabsquared.gitlabjenkins.gitlab.hook.model; | ||
|
||
import net.karneim.pojobuilder.GeneratePojoBuilder; | ||
import org.apache.commons.lang.builder.EqualsBuilder; | ||
import org.apache.commons.lang.builder.HashCodeBuilder; | ||
import org.apache.commons.lang.builder.ToStringBuilder; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* @author Benjamin ROBIN | ||
*/ | ||
@GeneratePojoBuilder(intoPackage = "*.builder.generated", withFactoryMethod = "*") | ||
public class MergeRequestLabel { | ||
|
||
/* | ||
"id": 206, | ||
"title": "API", | ||
"color": "#ffffff", | ||
"project_id": 14, | ||
"created_at": "2013-12-03T17:15:43Z", | ||
"updated_at": "2013-12-03T17:15:43Z", | ||
"template": false, | ||
"description": "API related issues", | ||
"type": "ProjectLabel", | ||
"group_id": 41 | ||
*/ | ||
private Integer id; | ||
private String title; | ||
private String color; | ||
private Integer projectId; | ||
private Date createdAt; | ||
private Date updatedAt; | ||
private Boolean template; | ||
private String description; | ||
private String type; | ||
private Integer groupId; | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public String getColor() { | ||
return color; | ||
} | ||
|
||
public void setColor(String color) { | ||
this.color = color; | ||
} | ||
|
||
public Integer getProjectId() { | ||
return projectId; | ||
} | ||
|
||
public void setProjectId(Integer projectId) { | ||
this.projectId = projectId; | ||
} | ||
|
||
public Date getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(Date createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
public Date getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(Date updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
|
||
public Boolean getTemplate() { | ||
return template; | ||
} | ||
|
||
public void setTemplate(Boolean template) { | ||
this.template = template; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public Integer getGroupId() { | ||
return groupId; | ||
} | ||
|
||
public void setGroupId(Integer groupId) { | ||
this.groupId = groupId; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
MergeRequestLabel that = (MergeRequestLabel) o; | ||
return new EqualsBuilder() | ||
.append(id, that.id) | ||
.append(title, that.title) | ||
.append(color, that.color) | ||
.append(projectId, that.projectId) | ||
.append(createdAt, that.createdAt) | ||
.append(updatedAt, that.updatedAt) | ||
.append(template, that.template) | ||
.append(description, that.description) | ||
.append(type, that.type) | ||
.append(groupId, that.groupId) | ||
.isEquals(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return new HashCodeBuilder(17, 37) | ||
.append(id) | ||
.append(title) | ||
.append(color) | ||
.append(projectId) | ||
.append(createdAt) | ||
.append(updatedAt) | ||
.append(template) | ||
.append(description) | ||
.append(type) | ||
.append(groupId) | ||
.toHashCode(); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this) | ||
.append("id", id) | ||
.append("title", title) | ||
.append("color", color) | ||
.append("projectId", projectId) | ||
.append("createdAt", createdAt) | ||
.append("updatedAt", updatedAt) | ||
.append("template", template) | ||
.append("description", description) | ||
.append("type", type) | ||
.append("groupId", groupId) | ||
.toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters