Skip to content

Commit bf969c6

Browse files
committed
Constants.ARGUMENT_REPO_ID introduced.
1 parent 1f0472b commit bf969c6

File tree

13 files changed

+349
-47
lines changed

13 files changed

+349
-47
lines changed

library/src/main/java/io/syslogic/github/api/model/WorkflowRun.java

Lines changed: 267 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
import android.content.ContentValues;
44

55
import androidx.annotation.NonNull;
6+
import androidx.databinding.Bindable;
67
import androidx.room.ColumnInfo;
78
import androidx.room.Entity;
9+
import androidx.room.Ignore;
810
import androidx.room.PrimaryKey;
911

1012
import com.google.gson.annotations.SerializedName;
1113

14+
import java.util.Date;
15+
1216
import io.syslogic.github.api.Constants;
1317

1418
/**
@@ -26,22 +30,285 @@ public class WorkflowRun extends BaseModel implements IContentProvider {
2630

2731
// foreign key
2832
@ColumnInfo(name = "workflow_id")
33+
@SerializedName("workflow_id")
2934
private long workflowId;
3035

36+
@ColumnInfo(name = "run_number")
37+
@SerializedName("run_number")
38+
private long runNumber;
39+
40+
@ColumnInfo(name = "check_suite_id")
41+
@SerializedName("check_suite_id")
42+
private long checkSuiteId;
43+
44+
@ColumnInfo(name = "check_suite_node_id")
45+
@SerializedName("check_suite_node_id")
46+
private String checkSuiteNodeId;
47+
48+
@ColumnInfo(name = "node_id")
49+
@SerializedName("node_id")
50+
private String nodeId;
51+
52+
@ColumnInfo(name = "event")
53+
@SerializedName("event")
54+
private String event;
55+
56+
@ColumnInfo(name = "status")
57+
@SerializedName("status")
58+
private String status;
59+
60+
@ColumnInfo(name = "conclusion")
61+
@SerializedName("conclusion")
62+
private String conclusion;
63+
64+
@ColumnInfo(name = "name")
65+
@SerializedName("name")
66+
private String name;
67+
68+
@ColumnInfo(name = "head_branch")
69+
@SerializedName("head_branch")
70+
private String headBranch;
71+
72+
@ColumnInfo(name = "head_sha")
73+
@SerializedName("head_sha")
74+
private String headSha;
75+
76+
@ColumnInfo(name = "display_title")
77+
@SerializedName("display_title")
78+
private String displayTitle;
79+
80+
@ColumnInfo(name = "url")
81+
@SerializedName("url")
82+
private String url;
83+
84+
@ColumnInfo(name = "html_url")
85+
@SerializedName("html_url")
86+
private String htmlUrl;
87+
88+
@ColumnInfo(name = "created_at")
89+
@SerializedName("created_at")
90+
private Date createdAt;
91+
92+
@ColumnInfo(name = "updated_at")
93+
@SerializedName("updated_at")
94+
private Date updatedAt;
95+
96+
@Ignore
97+
@SerializedName("actor")
98+
private User actor;
99+
100+
@Ignore
101+
@SerializedName("triggering_actor")
102+
private User triggeringActor;
103+
104+
@ColumnInfo(name = "run_started_at")
105+
@SerializedName("run_started_at")
106+
private Date runStartedAt;
107+
108+
@ColumnInfo(name = "run_attempt")
109+
@SerializedName("run_attempt")
110+
private long runAttempt;
111+
112+
113+
/** Setters... */
31114
public void setId(long value) {
32115
this.id = value;
33116
}
117+
34118
public void setWorkflowId(long value) {
35119
this.workflowId = value;
36120
}
37121

122+
public void setRunNumber(long value) {
123+
this.runNumber = value;
124+
}
125+
126+
public void setCheckSuiteId(long value) {
127+
this.checkSuiteId = value;
128+
}
129+
130+
public void setCheckSuiteNodeId(@NonNull String value) {
131+
this.checkSuiteNodeId = value;
132+
}
133+
134+
public void setName(@NonNull String value) {
135+
this.name = value;
136+
}
137+
138+
public void setHeadBranch(@NonNull String value) {
139+
this.headBranch = value;
140+
}
141+
142+
public void setDisplayTitle(@NonNull String value) {
143+
this.displayTitle = value;
144+
}
145+
146+
public void setEvent(@NonNull String value) {
147+
this.event = value;
148+
}
149+
150+
public void setStatus(@NonNull String value) {
151+
this.status = value;
152+
}
153+
154+
public void setConclusion(@NonNull String value) {
155+
this.conclusion = value;
156+
}
157+
158+
public void setNodeId(@NonNull String value) {
159+
this.nodeId = value;
160+
}
161+
162+
public void setHeadSha(@NonNull String value) {
163+
this.headSha = value;
164+
}
165+
166+
public void setUrl(@NonNull String value) {
167+
this.url = value;
168+
}
169+
170+
public void setHtmlUrl(@NonNull String value) {
171+
this.htmlUrl = value;
172+
}
173+
174+
public void setCreatedAt(@NonNull Date value) {
175+
this.createdAt = value;
176+
}
177+
178+
public void setUpdatedAt(@NonNull Date value) {
179+
this.updatedAt = value;
180+
}
181+
182+
public void setActor(@NonNull User value) {
183+
this.actor = value;
184+
}
185+
186+
public void setTriggeringActor(@NonNull User value) {
187+
this.triggeringActor = value;
188+
}
189+
190+
/** Getters... */
191+
@Bindable
38192
public long getId() {
39193
return this.id;
40194
}
195+
196+
@Bindable
41197
public long getWorkflowId() {
42198
return this.workflowId;
43199
}
44200

201+
@Bindable
202+
public long getRunNumber() {
203+
return this.runNumber;
204+
}
205+
206+
@Bindable
207+
public long getCheckSuiteId() {
208+
return this.checkSuiteId;
209+
}
210+
211+
@NonNull
212+
@Bindable
213+
public String getCheckSuiteNodeId() {
214+
return this.checkSuiteNodeId;
215+
}
216+
217+
@NonNull
218+
@Bindable
219+
public String getName() {
220+
return this.name;
221+
}
222+
223+
@NonNull
224+
@Bindable
225+
public String getHeadBranch() {
226+
return this.headBranch;
227+
}
228+
229+
@NonNull
230+
@Bindable
231+
public String getDisplayTitle() {
232+
return this.displayTitle;
233+
}
234+
235+
@NonNull
236+
@Bindable
237+
public String getEvent() {
238+
return this.event;
239+
}
240+
241+
@NonNull
242+
@Bindable
243+
public String getStatus() {
244+
return this.status;
245+
}
246+
247+
@NonNull
248+
@Bindable
249+
public String getConclusion() {
250+
return this.conclusion;
251+
}
252+
253+
@NonNull
254+
@Bindable
255+
public String getNodeId() {
256+
return this.nodeId;
257+
}
258+
259+
@NonNull
260+
@Bindable
261+
public String getHeadSha() {
262+
return this.headSha;
263+
}
264+
265+
@NonNull
266+
@Bindable
267+
public String getUrl() {
268+
return this.url;
269+
}
270+
271+
@NonNull
272+
@Bindable
273+
public String getHtmlUrl() {
274+
return this.htmlUrl;
275+
}
276+
277+
@NonNull
278+
@Bindable
279+
public Date getCreatedAt() {
280+
return this.createdAt;
281+
}
282+
283+
@NonNull
284+
@Bindable
285+
public Date getUpdatedAt() {
286+
return this.updatedAt;
287+
}
288+
289+
@NonNull
290+
@Bindable
291+
public User getActor() {
292+
return this.actor;
293+
}
294+
295+
@NonNull
296+
@Bindable
297+
public User getTriggeringActor() {
298+
return this.triggeringActor;
299+
}
300+
301+
@NonNull
302+
@Bindable
303+
public Date getRunStartedAt() {
304+
return this.runStartedAt;
305+
}
306+
307+
@Bindable
308+
public long getRunAttempt() {
309+
return this.runAttempt;
310+
}
311+
45312
@NonNull
46313
@Override
47314
public BaseModel fromContentValues(@NonNull ContentValues values) {

mobile/src/main/java/io/syslogic/github/Constants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public final class Constants {
1111

1212
@NonNull public static final String ARGUMENT_ITEM_ID = "itemId";
1313
@NonNull public static final String ARGUMENT_ITEM_NAME = "name";
14+
@NonNull public static final String ARGUMENT_REPO_ID = "repoId";
1415
@NonNull public static final String ARGUMENT_RUN_ID = "runId";
1516
@NonNull public static final String ARGUMENT_REPOSITORY_TOPIC = "topic";
1617

mobile/src/main/java/io/syslogic/github/fragment/RepositoryFragment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public RepositoryFragment() {}
8383
public static RepositoryFragment newInstance(long itemId) {
8484
RepositoryFragment fragment = new RepositoryFragment();
8585
Bundle args = new Bundle();
86-
args.putLong(Constants.ARGUMENT_ITEM_ID, itemId);
86+
args.putLong(Constants.ARGUMENT_REPO_ID, itemId);
8787
fragment.setArguments(args);
8888
return fragment;
8989
}
@@ -94,7 +94,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
9494
this.registerBroadcastReceiver();
9595
Bundle args = this.getArguments();
9696
if (args != null) {
97-
this.setItemId(args.getLong(Constants.ARGUMENT_ITEM_ID));
97+
this.setItemId(args.getLong(Constants.ARGUMENT_REPO_ID));
9898
}
9999
}
100100

0 commit comments

Comments
 (0)