-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
133 lines (109 loc) · 3.44 KB
/
Copy pathtypes.go
File metadata and controls
133 lines (109 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package github
import "github.com/shurcooL/githubv4"
// CheckRunNodes represents the checkRun status of the Nodes
type CheckRunNodes struct {
Name githubv4.String
Status githubv4.String
Title githubv4.String
Conclusion githubv4.String
}
// CheckRuns represents the check run of an array of Nodes
type CheckRuns struct {
Nodes []CheckRunNodes
}
// Workflow represents the information of the Github Workflow
type Workflow struct {
Name githubv4.String
}
// CheckSuite represents the information about the check suite obtained from Github
type CheckSuite struct {
Conclusion githubv4.String
}
// WorkflowRun represents the information about the workflow run execution
type WorkflowRun struct {
Workflow Workflow
CheckSuite CheckSuite
}
// CheckSuiteNode represents the information about the check suite information of the Node
type CheckSuiteNode struct {
WorkflowRun WorkflowRun
CheckRuns CheckRuns `graphql:"checkRuns(first: 25)"`
}
// CheckSuites represents the information about the check suite of a slice of Nodes
type CheckSuites struct {
Nodes []CheckSuiteNode
}
// Context represents the information about the Context
type Context struct {
Context githubv4.String
State githubv4.String
}
// NodeStatus represents the information about a slice of Contexts
type NodeStatus struct {
Contexts []Context
}
// EdgeNode represents the information about an edge node
type EdgeNode struct {
Oid githubv4.String
Message githubv4.String
}
// EdgeParent represents the information about a parent node
type EdgeParent struct {
Node EdgeNode
}
// StatusCheckRollupContexts represents the information about the status check of roullup contexts
type StatusCheckRollupContexts struct {
TotalCount githubv4.Int
}
// StatusCheckRollup represents the information about the status check of rollup
type StatusCheckRollup struct {
State githubv4.String
Contexts StatusCheckRollupContexts `graphql:"contexts(first: $parentsNumber)"`
}
// Author represents the information about the commit author
type Author struct {
Name githubv4.String
}
// ParentsEdge represents the information about the parents edge
type ParentsEdge struct {
Edges []EdgeParent
}
// EdgeRootNode represents the information about a edge root node
type EdgeRootNode struct {
Parents ParentsEdge `graphql:"parents(first: $parentsNumber)"`
Oid githubv4.String
Message githubv4.String
AuthoredDate githubv4.DateTime
Author Author
StatusCheckRollup StatusCheckRollup
CheckSuites CheckSuites `graphql:"checkSuites(first: 20)"`
Status NodeStatus
}
// Edge represents the information about a edge element
type Edge struct {
Node EdgeRootNode
}
// History represents the information about a slice of Edges
type History struct {
Edges []Edge
}
// TargetCommit represents the information about a commit history
type TargetCommit struct {
History History `graphql:"history(first: $commitsNumber)"`
}
// Target represents the target of a specific commit
type Target struct {
Commit TargetCommit `graphql:"... on Commit"`
}
// Ref represents the information about a ref element
type Ref struct {
Target Target
}
// Repository represents the information obtained about a repository in a Github Query
type Repository struct {
Ref Ref `graphql:"ref(qualifiedName: $branch)"`
}
// Query represents the information obtained in a Github Query
type Query struct {
Repository Repository `graphql:"repository(owner: $owner, name: $name)"`
}