@@ -59,7 +59,7 @@ func TestCheck(t *testing.T) {
59
59
pullRequests : testPullRequests ,
60
60
files : [][]string {},
61
61
expected : resource.CheckResponse {
62
- resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
62
+ resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
63
63
},
64
64
},
65
65
@@ -69,11 +69,11 @@ func TestCheck(t *testing.T) {
69
69
Repository : "itsdalmo/test-repository" ,
70
70
AccessToken : "oauthtoken" ,
71
71
},
72
- version : resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
72
+ version : resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
73
73
pullRequests : testPullRequests ,
74
74
files : [][]string {},
75
75
expected : resource.CheckResponse {
76
- resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
76
+ resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
77
77
},
78
78
},
79
79
@@ -83,12 +83,12 @@ func TestCheck(t *testing.T) {
83
83
Repository : "itsdalmo/test-repository" ,
84
84
AccessToken : "oauthtoken" ,
85
85
},
86
- version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .CommittedDate .Time ),
86
+ version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .PushedDate .Time ),
87
87
pullRequests : testPullRequests ,
88
88
files : [][]string {},
89
89
expected : resource.CheckResponse {
90
- resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .CommittedDate .Time ),
91
- resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
90
+ resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .PushedDate .Time ),
91
+ resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
92
92
},
93
93
},
94
94
@@ -99,15 +99,15 @@ func TestCheck(t *testing.T) {
99
99
AccessToken : "oauthtoken" ,
100
100
Paths : []string {"terraform/*/*.tf" , "terraform/*/*/*.tf" },
101
101
},
102
- version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .CommittedDate .Time ),
102
+ version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .PushedDate .Time ),
103
103
pullRequests : testPullRequests ,
104
104
files : [][]string {
105
105
{"README.md" , "travis.yml" },
106
106
{"terraform/modules/ecs/main.tf" , "README.md" },
107
107
{"terraform/modules/variables.tf" , "travis.yml" },
108
108
},
109
109
expected : resource.CheckResponse {
110
- resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .CommittedDate .Time ),
110
+ resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .PushedDate .Time ),
111
111
},
112
112
},
113
113
@@ -118,15 +118,15 @@ func TestCheck(t *testing.T) {
118
118
AccessToken : "oauthtoken" ,
119
119
IgnorePaths : []string {"*.md" , "*.yml" },
120
120
},
121
- version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .CommittedDate .Time ),
121
+ version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .PushedDate .Time ),
122
122
pullRequests : testPullRequests ,
123
123
files : [][]string {
124
124
{"README.md" , "travis.yml" },
125
125
{"terraform/modules/ecs/main.tf" , "README.md" },
126
126
{"terraform/modules/variables.tf" , "travis.yml" },
127
127
},
128
128
expected : resource.CheckResponse {
129
- resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .CommittedDate .Time ),
129
+ resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .PushedDate .Time ),
130
130
},
131
131
},
132
132
@@ -137,10 +137,10 @@ func TestCheck(t *testing.T) {
137
137
AccessToken : "oauthtoken" ,
138
138
DisableCISkip : true ,
139
139
},
140
- version : resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
140
+ version : resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
141
141
pullRequests : testPullRequests ,
142
142
expected : resource.CheckResponse {
143
- resource .NewVersion (testPullRequests [0 ], testPullRequests [0 ].Tip .CommittedDate .Time ),
143
+ resource .NewVersion (testPullRequests [0 ], testPullRequests [0 ].Tip .PushedDate .Time ),
144
144
},
145
145
},
146
146
@@ -151,10 +151,10 @@ func TestCheck(t *testing.T) {
151
151
AccessToken : "oauthtoken" ,
152
152
IgnoreDrafts : true ,
153
153
},
154
- version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .CommittedDate .Time ),
154
+ version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .PushedDate .Time ),
155
155
pullRequests : testPullRequests ,
156
156
expected : resource.CheckResponse {
157
- resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
157
+ resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
158
158
},
159
159
},
160
160
@@ -165,11 +165,11 @@ func TestCheck(t *testing.T) {
165
165
AccessToken : "oauthtoken" ,
166
166
IgnoreDrafts : false ,
167
167
},
168
- version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .CommittedDate .Time ),
168
+ version : resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .PushedDate .Time ),
169
169
pullRequests : testPullRequests ,
170
170
expected : resource.CheckResponse {
171
- resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .CommittedDate .Time ),
172
- resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
171
+ resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .PushedDate .Time ),
172
+ resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
173
173
},
174
174
},
175
175
@@ -180,12 +180,12 @@ func TestCheck(t *testing.T) {
180
180
AccessToken : "oauthtoken" ,
181
181
DisableForks : true ,
182
182
},
183
- version : resource .NewVersion (testPullRequests [5 ], testPullRequests [5 ].Tip .CommittedDate .Time ),
183
+ version : resource .NewVersion (testPullRequests [5 ], testPullRequests [5 ].Tip .PushedDate .Time ),
184
184
pullRequests : testPullRequests ,
185
185
expected : resource.CheckResponse {
186
- resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .CommittedDate .Time ),
187
- resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .CommittedDate .Time ),
188
- resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .CommittedDate .Time ),
186
+ resource .NewVersion (testPullRequests [3 ], testPullRequests [3 ].Tip .PushedDate .Time ),
187
+ resource .NewVersion (testPullRequests [2 ], testPullRequests [2 ].Tip .PushedDate .Time ),
188
+ resource .NewVersion (testPullRequests [1 ], testPullRequests [1 ].Tip .PushedDate .Time ),
189
189
},
190
190
},
191
191
@@ -200,7 +200,7 @@ func TestCheck(t *testing.T) {
200
200
pullRequests : testPullRequests ,
201
201
files : [][]string {},
202
202
expected : resource.CheckResponse {
203
- resource .NewVersion (testPullRequests [6 ], testPullRequests [6 ].Tip .CommittedDate .Time ),
203
+ resource .NewVersion (testPullRequests [6 ], testPullRequests [6 ].Tip .PushedDate .Time ),
204
204
},
205
205
},
206
206
@@ -211,10 +211,10 @@ func TestCheck(t *testing.T) {
211
211
AccessToken : "oauthtoken" ,
212
212
RequiredReviewApprovals : 1 ,
213
213
},
214
- version : resource .NewVersion (testPullRequests [8 ], testPullRequests [8 ].Tip .CommittedDate .Time ),
214
+ version : resource .NewVersion (testPullRequests [8 ], testPullRequests [8 ].Tip .PushedDate .Time ),
215
215
pullRequests : testPullRequests ,
216
216
expected : resource.CheckResponse {
217
- resource .NewVersion (testPullRequests [7 ], testPullRequests [7 ].Tip .CommittedDate .Time ),
217
+ resource .NewVersion (testPullRequests [7 ], testPullRequests [7 ].Tip .PushedDate .Time ),
218
218
},
219
219
},
220
220
@@ -229,7 +229,7 @@ func TestCheck(t *testing.T) {
229
229
pullRequests : testPullRequests ,
230
230
files : [][]string {},
231
231
expected : resource.CheckResponse {
232
- resource .NewVersion (testPullRequests [6 ], testPullRequests [6 ].Tip .CommittedDate .Time ),
232
+ resource .NewVersion (testPullRequests [6 ], testPullRequests [6 ].Tip .PushedDate .Time ),
233
233
},
234
234
},
235
235
@@ -244,7 +244,7 @@ func TestCheck(t *testing.T) {
244
244
pullRequests : testPullRequests ,
245
245
files : [][]string {},
246
246
expected : resource.CheckResponse {
247
- resource .NewVersion (testPullRequests [9 ], testPullRequests [9 ].Tip .CommittedDate .Time ),
247
+ resource .NewVersion (testPullRequests [9 ], testPullRequests [9 ].Tip .PushedDate .Time ),
248
248
},
249
249
},
250
250
@@ -267,12 +267,12 @@ func TestCheck(t *testing.T) {
267
267
AccessToken : "oauthtoken" ,
268
268
States : []githubv4.PullRequestState {githubv4 .PullRequestStateClosed , githubv4 .PullRequestStateMerged },
269
269
},
270
- version : resource .NewVersion (testPullRequests [11 ], testPullRequests [11 ].Tip .CommittedDate .Time ),
270
+ version : resource .NewVersion (testPullRequests [11 ], testPullRequests [11 ].Tip .PushedDate .Time ),
271
271
pullRequests : testPullRequests ,
272
272
files : [][]string {},
273
273
expected : resource.CheckResponse {
274
- resource .NewVersion (testPullRequests [10 ], testPullRequests [10 ].Tip .CommittedDate .Time ),
275
- resource .NewVersion (testPullRequests [9 ], testPullRequests [9 ].Tip .CommittedDate .Time ),
274
+ resource .NewVersion (testPullRequests [10 ], testPullRequests [10 ].Tip .PushedDate .Time ),
275
+ resource .NewVersion (testPullRequests [9 ], testPullRequests [9 ].Tip .PushedDate .Time ),
276
276
},
277
277
},
278
278
{
@@ -288,7 +288,7 @@ func TestCheck(t *testing.T) {
288
288
pullRequests : testPullRequests ,
289
289
files : [][]string {},
290
290
expected : resource.CheckResponse {
291
- resource .NewVersion (testPullRequests [12 ], testPullRequests [12 ].Tip .CommittedDate .Time ),
291
+ resource .NewVersion (testPullRequests [12 ], testPullRequests [12 ].Tip .PushedDate .Time ),
292
292
},
293
293
},
294
294
{
@@ -300,11 +300,11 @@ func TestCheck(t *testing.T) {
300
300
{Context : "my-status-check-2" , State : "success" },
301
301
},
302
302
},
303
- version : resource .NewVersion (testPullRequests [9 ], testPullRequests [9 ].Tip .CommittedDate .Time ),
303
+ version : resource .NewVersion (testPullRequests [9 ], testPullRequests [9 ].Tip .PushedDate .Time ),
304
304
pullRequests : testPullRequests ,
305
305
files : [][]string {},
306
306
expected : resource.CheckResponse {
307
- resource .NewVersion (testPullRequests [14 ], testPullRequests [14 ].Tip .Status . Contexts [ 0 ]. CreatedAt .Time ),
307
+ resource .NewVersion (testPullRequests [9 ], testPullRequests [9 ].Tip .PushedDate .Time ),
308
308
},
309
309
},
310
310
{
@@ -322,7 +322,7 @@ func TestCheck(t *testing.T) {
322
322
files : [][]string {},
323
323
expected : resource.CheckResponse {
324
324
// todo: pull request index
325
- resource .NewVersion (testPullRequests [13 ], testPullRequests [13 ].Tip .CommittedDate .Time ),
325
+ resource .NewVersion (testPullRequests [13 ], testPullRequests [13 ].Tip .PushedDate .Time ),
326
326
},
327
327
},
328
328
}
0 commit comments