@argos-ci/core 0.8.1 → 0.8.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +23 -8
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -66,6 +66,12 @@ const schema = {
|
|
|
66
66
|
default: null,
|
|
67
67
|
nullable: true
|
|
68
68
|
},
|
|
69
|
+
prHeadCommit: {
|
|
70
|
+
env: "ARGOS_PR_HEAD_COMMIT",
|
|
71
|
+
format: Number,
|
|
72
|
+
default: null,
|
|
73
|
+
nullable: true
|
|
74
|
+
},
|
|
69
75
|
parallel: {
|
|
70
76
|
env: "ARGOS_PARALLEL",
|
|
71
77
|
default: false,
|
|
@@ -150,7 +156,8 @@ const service$4 = {
|
|
|
150
156
|
repository: env.BUILDKITE_PROJECT_SLUG || null,
|
|
151
157
|
jobId: null,
|
|
152
158
|
runId: null,
|
|
153
|
-
prNumber: env.BUILDKITE_PULL_REQUEST ? Number(env.BUILDKITE_PULL_REQUEST) : null
|
|
159
|
+
prNumber: env.BUILDKITE_PULL_REQUEST ? Number(env.BUILDKITE_PULL_REQUEST) : null,
|
|
160
|
+
prHeadCommit: null
|
|
154
161
|
};
|
|
155
162
|
}
|
|
156
163
|
};
|
|
@@ -165,7 +172,8 @@ const service$3 = {
|
|
|
165
172
|
repository: null,
|
|
166
173
|
jobId: null,
|
|
167
174
|
runId: null,
|
|
168
|
-
prNumber: null
|
|
175
|
+
prNumber: null,
|
|
176
|
+
prHeadCommit: null
|
|
169
177
|
})
|
|
170
178
|
};
|
|
171
179
|
|
|
@@ -197,7 +205,7 @@ const service$2 = {
|
|
|
197
205
|
env
|
|
198
206
|
});
|
|
199
207
|
return {
|
|
200
|
-
commit:
|
|
208
|
+
commit: process.env.GITHUB_SHA || null,
|
|
201
209
|
branch: payload?.pull_request?.head.ref || getBranch({
|
|
202
210
|
env
|
|
203
211
|
}) || null,
|
|
@@ -207,7 +215,8 @@ const service$2 = {
|
|
|
207
215
|
}),
|
|
208
216
|
jobId: env.GITHUB_JOB || null,
|
|
209
217
|
runId: env.GITHUB_RUN_ID || null,
|
|
210
|
-
prNumber: payload?.pull_request?.number || null
|
|
218
|
+
prNumber: payload?.pull_request?.number || null,
|
|
219
|
+
prHeadCommit: payload?.pull_request?.head.sha ?? null
|
|
211
220
|
};
|
|
212
221
|
}
|
|
213
222
|
};
|
|
@@ -233,7 +242,8 @@ const service$1 = {
|
|
|
233
242
|
runId: null,
|
|
234
243
|
prNumber: getPrNumber$1({
|
|
235
244
|
env
|
|
236
|
-
})
|
|
245
|
+
}),
|
|
246
|
+
prHeadCommit: null
|
|
237
247
|
};
|
|
238
248
|
}
|
|
239
249
|
};
|
|
@@ -262,7 +272,8 @@ const service = {
|
|
|
262
272
|
repository: getRepository(ctx),
|
|
263
273
|
jobId: null,
|
|
264
274
|
runId: null,
|
|
265
|
-
prNumber: getPrNumber(ctx)
|
|
275
|
+
prNumber: getPrNumber(ctx),
|
|
276
|
+
prHeadCommit: null
|
|
266
277
|
};
|
|
267
278
|
}
|
|
268
279
|
};
|
|
@@ -293,6 +304,7 @@ const getCiEnvironmentFromEnvCi = (ctx)=>{
|
|
|
293
304
|
const jobId = ciContext.job ?? null;
|
|
294
305
|
const runId = null;
|
|
295
306
|
const prNumber = null;
|
|
307
|
+
const prHeadCommit = null;
|
|
296
308
|
return commit ? {
|
|
297
309
|
name,
|
|
298
310
|
commit,
|
|
@@ -301,7 +313,8 @@ const getCiEnvironmentFromEnvCi = (ctx)=>{
|
|
|
301
313
|
repository,
|
|
302
314
|
jobId,
|
|
303
315
|
runId,
|
|
304
|
-
prNumber
|
|
316
|
+
prNumber,
|
|
317
|
+
prHeadCommit
|
|
305
318
|
} : null;
|
|
306
319
|
};
|
|
307
320
|
|
|
@@ -480,6 +493,7 @@ const getConfigFromOptions = (options)=>{
|
|
|
480
493
|
token: config.get("token") ?? options.token ?? null,
|
|
481
494
|
buildName: config.get("buildName") ?? options.buildName ?? null,
|
|
482
495
|
prNumber: config.get("prNumber") ?? options.prNumber ?? ciEnv?.prNumber ?? null,
|
|
496
|
+
prHeadCommit: config.get("prHeadCommit") ?? ciEnv?.prHeadCommit ?? null,
|
|
483
497
|
ciService: ciEnv?.name ?? null,
|
|
484
498
|
owner: ciEnv?.owner ?? null,
|
|
485
499
|
repository: ciEnv?.repository ?? null,
|
|
@@ -535,7 +549,8 @@ const getConfigFromOptions = (options)=>{
|
|
|
535
549
|
parallel: config.parallel,
|
|
536
550
|
parallelNonce: config.parallelNonce,
|
|
537
551
|
screenshotKeys: Array.from(new Set(screenshots.map((screenshot)=>screenshot.hash))),
|
|
538
|
-
prNumber: config.prNumber
|
|
552
|
+
prNumber: config.prNumber,
|
|
553
|
+
prHeadCommit: config.prHeadCommit
|
|
539
554
|
});
|
|
540
555
|
debug("Got screenshots", result);
|
|
541
556
|
debug(`Split screenshots in chunks of ${CHUNK_SIZE}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/core",
|
|
3
3
|
"description": "Visual testing solution to avoid visual regression. The core component of Argos SDK that handles build creation.",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.2-alpha.0+2c79db4",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rm -rf dist",
|
|
7
7
|
"build": "rollup -c",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"rollup-plugin-dts": "^4.2.3",
|
|
61
61
|
"rollup-plugin-swc3": "^0.6.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "2c79db40e62d541cca2c3e6b124ffe2063e8c838"
|
|
64
64
|
}
|