Fix: внесены правки по результатам ревью 1.
This commit is contained in:
parent
35783a55e7
commit
a514fcb74f
@ -1,5 +1,10 @@
|
||||
package dev.struchkov.bot.gitlab.context.domain;
|
||||
|
||||
/**
|
||||
* @author Dmitry Sheyko 21.01.2021
|
||||
*/
|
||||
public enum IssueState {
|
||||
|
||||
OPENED, CLOSED
|
||||
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
package dev.struchkov.bot.gitlab.context.domain;
|
||||
|
||||
/**
|
||||
* @author Dmitry Sheyko 21.01.2021
|
||||
*/
|
||||
public enum IssueType {
|
||||
ISSUE,
|
||||
INCIDENT
|
||||
|
||||
ISSUE, INCIDENT
|
||||
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
package dev.struchkov.bot.gitlab.context.domain;
|
||||
|
||||
public enum MilestoneState {
|
||||
ACTIVE, CLOSED
|
||||
}
|
@ -28,14 +28,11 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* Сущность Issue.
|
||||
*
|
||||
* @author Dmitry Sheyko [17.01.2023]
|
||||
*/
|
||||
|
||||
// При запросе issue учесть что пагинация по умолчанию - 20 объектов
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
|
@ -1,10 +0,0 @@
|
||||
package dev.struchkov.bot.gitlab.core.service.parser;
|
||||
|
||||
import dev.struchkov.bot.gitlab.context.domain.IssueState;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class IssueRequestParser {
|
||||
private static final Set<IssueState> OLD_STATUSES = Set.of(
|
||||
IssueState.OPENED, IssueState.CLOSED);
|
||||
}
|
@ -3,48 +3,7 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.17.xsd">
|
||||
|
||||
<changeSet id="2023-01-19-create-table-milestone" author="Dmitry Sheyko">
|
||||
<createTable tableName="milestone">
|
||||
<column name="id" type="int">
|
||||
<constraints nullable="false" primaryKey="true"/>
|
||||
</column>
|
||||
<column name="two_id" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="project_id" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="title" type="varchar(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="description" type="varchar(2000)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="state" type="varchar(10)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="created_date" type="datetime">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="updated_date" type="datetime">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="start_date" type="datetime">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="due_date" type="datetime">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="expired" type="boolean">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="web_url" type="varchar(300)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="create-table-issue" author="Dmitry Sheyko">
|
||||
<changeSet id="2023-01-19-create-table-issue" author="Dmitry Sheyko">
|
||||
<createTable tableName="issue">
|
||||
<column name="id" type="int">
|
||||
<constraints nullable="false" primaryKey="true"/>
|
||||
@ -76,18 +35,12 @@
|
||||
<column name="closed_by_id" type="int">
|
||||
<constraints nullable="true" foreignKeyName="fk_issue_closed_by_id_person_id" references="person(id)"/>
|
||||
</column>
|
||||
<column name="milestone_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="fk_issie_milestone_id_milestone_id" references="milestone(id)"/>
|
||||
</column>
|
||||
<column name="author_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="fk_issue_author_id_person_id" references="person(id)"/>
|
||||
</column>
|
||||
<column name="type" type="varchar(10)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="assignee_id" type="int">
|
||||
<constraints nullable="true" foreignKeyName="fk_issue_assignee_id_person_id" references="person(id)"/>
|
||||
</column>
|
||||
<column name="user_notes_count" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
@ -109,88 +62,37 @@
|
||||
<column name="discussion_locked" type="int">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="issue_type" type="varchar(10)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="web_url" type="varchar(300)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="time_estimate" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="total_time_spent" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="human_time_estimate" type="varchar(20)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="human_total_time_spent" type="varchar(20)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="task_count" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="task_completed_count" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="web_url" type="varchar(300)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="blocking_issues_count" type="int">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="has_tasks" type="boolean">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="link_to_self" type="varchar(300)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="link_to_notes" type="varchar(300)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="link_to_award_emoji" type="varchar(300)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="link_to_project" type="varchar(300)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="link_to_closed_as_duplicate_of" type="varchar(300)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="short_reference" type="varchar(100)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="relative_reference" type="varchar(100)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="full_reference" type="varchar(100)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
<column name="severity" type="varchar(50)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="moved_to_id" type="int">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="service_desk_reply_to" type="varchar(1000)">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
<column name="epic_issue_id" type="int">
|
||||
<constraints nullable="true"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="create-table-issue_labels" author="Dmitry Sheyko">
|
||||
<createTable tableName="issue_labels">
|
||||
<changeSet id="2023-01-19-create-table-issue_label" author="Dmitry Sheyko">
|
||||
<createTable tableName="issue_label">
|
||||
<column name="issue_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="fk_issue_labels_issue_id"
|
||||
<constraints nullable="false" foreignKeyName="fk_issue_label_issue_id"
|
||||
references="issue(id)" deleteCascade="true"/>
|
||||
</column>
|
||||
<column name="labels" type="varchar(255)">
|
||||
<column name="label" type="varchar(255)">
|
||||
<constraints nullable="false"/>
|
||||
</column>
|
||||
</createTable>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="create-table-issue_assignees" author="Dmitry Sheyko">
|
||||
<changeSet id="2023-01-19-create-table-issue_assignees" author="Dmitry Sheyko">
|
||||
<createTable tableName="issue_assignees">
|
||||
<column name="issue_id" type="int">
|
||||
<constraints nullable="false" foreignKeyName="fk_issue_assignees_issue_id" references="issue(id)"/>
|
||||
|
@ -13,9 +13,9 @@ import java.util.Set;
|
||||
/**
|
||||
* @author Dmitry Sheyko [17.01.2023]
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class IssueJson {
|
||||
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("iid")
|
||||
@ -74,7 +74,7 @@ public class IssueJson {
|
||||
private Integer discussionLocked;
|
||||
|
||||
@JsonProperty("issue_type")
|
||||
private String issueType; //TODO выяснить зачем дублирует поле type
|
||||
private String issueType;
|
||||
|
||||
@JsonProperty("web_url")
|
||||
private String webUrl;
|
||||
@ -104,5 +104,6 @@ public class IssueJson {
|
||||
private Long serviceDescReplyTo;
|
||||
|
||||
@JsonProperty("epic_issue_id")
|
||||
private Long epicId; // "epic_issue_id" Поле доступное только для премиум акаунтов
|
||||
private Long epicId;
|
||||
|
||||
}
|
@ -5,11 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
/**
|
||||
* @author Dmitry Sheyko [17.01.2023]
|
||||
*/
|
||||
|
||||
public enum IssueStateJson {
|
||||
|
||||
@JsonProperty("opened")
|
||||
OPENED,
|
||||
|
||||
@JsonProperty("closed")
|
||||
CLOSED
|
||||
|
||||
}
|
@ -1,6 +1,10 @@
|
||||
package dev.struchkov.bot.gitlab.sdk.domain;
|
||||
|
||||
/**
|
||||
* @author Dmitry Sheyko 21.01.2021
|
||||
*/
|
||||
public enum IssueTypeJson {
|
||||
ISSUE,
|
||||
INCIDENT
|
||||
|
||||
ISSUE, INCIDENT
|
||||
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* @author Dmitry Sheyko [17.01.2023]
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class MilestoneJson {
|
||||
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("iid")
|
||||
@ -49,4 +49,5 @@ public class MilestoneJson {
|
||||
|
||||
@JsonProperty("web_url")
|
||||
private String webUrl;
|
||||
|
||||
}
|
@ -5,11 +5,12 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
/**
|
||||
* @author Dmitry Sheyko [17.01.2023]
|
||||
*/
|
||||
|
||||
public enum MilestoneStateJson {
|
||||
|
||||
@JsonProperty("active")
|
||||
ACTIVE,
|
||||
|
||||
@JsonProperty("closed")
|
||||
CLOSED
|
||||
|
||||
}
|
@ -6,9 +6,9 @@ import lombok.Data;
|
||||
/**
|
||||
* @author Dmitry Sheyko [17.01.2023]
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReferencesJson {
|
||||
|
||||
@JsonProperty("short")
|
||||
private String shortReference;
|
||||
|
||||
@ -17,4 +17,5 @@ public class ReferencesJson {
|
||||
|
||||
@JsonProperty("full")
|
||||
private String fullReference;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user