@@ -36093,7 +36093,16 @@ __nccwpck_require__.r(__webpack_exports__);
36093
36093
* Send the full list of available test files and get back the filees
36094
36094
* appropriate to this node.
36095
36095
*/
36096
- async function split({ tests, label, nodeCount, nodeIndex, token, url }, context) {
36096
+ async function split({ hostname, tests, label, nodeCount, nodeIndex, token, url }, context) {
36097
+ const u = new URL(url);
36098
+ if (hostname !== u.hostname) {
36099
+ u.hostname = hostname;
36100
+ context.logger.info('Overriding hostname', {
36101
+ newUrl: u.href,
36102
+ originalUrl: url,
36103
+ });
36104
+ url = u.href;
36105
+ }
36097
36106
// This is just here to test the buildkite plugin. The only other option I can
36098
36107
// think of is to run a server locally that responds with this and use the
36099
36108
// `url` param, but that currently seems like more trouble than its worth for
@@ -36332,7 +36341,7 @@ async function multiStepUpload(args, context) {
36332
36341
logger.info(`SHA: ${sha}`);
36333
36342
logger.debug(`URL: ${url}/upload`);
36334
36343
const filenames = await (0,file/* multiGlob */._)(report, context);
36335
- logger.group('Requesing signed urls');
36344
+ logger.group('Requesting signed urls');
36336
36345
const { keys, urls, signature } = await getSignedUploadUrls(args, filenames);
36337
36346
logger.groupEnd();
36338
36347
logger.group('Uploading reports');
@@ -36420,14 +36429,25 @@ async function submit_submit(input, context) {
36420
36429
* gets a 404. This _should_ make things future proof so it'll get more
36421
36430
* efficient once the new version is released.
36422
36431
*/
36423
- async function tryMultiStepUploadOrFallbackToSingle(input, context) {
36432
+ async function tryMultiStepUploadOrFallbackToSingle({ hostname, url, ...rest }, context) {
36433
+ const u = new URL(url);
36434
+ if (hostname !== u.hostname) {
36435
+ u.hostname = hostname;
36436
+ context.logger.info('Overriding hostname', {
36437
+ newUrl: u.href,
36438
+ originalUrl: url,
36439
+ });
36440
+ url = u.href;
36441
+ }
36442
+ const input = { url, ...rest };
36424
36443
try {
36425
36444
return await multiStepUpload(input, context);
36426
36445
}
36427
36446
catch (err) {
36428
36447
if (axios_default().isAxiosError(err)) {
36429
36448
// CI doesn't like safe-access here.
36430
36449
if (err.response && err.response.status === 404) {
36450
+ context.logger.info('Falling back to single step upload');
36431
36451
// eslint-disable-next-line import/no-deprecated
36432
36452
return await singleStepUpload(input, context);
36433
36453
}
@@ -36464,7 +36484,7 @@ var axios_default = /*#__PURE__*/__nccwpck_require__.n(axios);
36464
36484
var ci_info = __nccwpck_require__(3257);
36465
36485
var ci_info_default = /*#__PURE__*/__nccwpck_require__.n(ci_info);
36466
36486
;// CONCATENATED MODULE: ../../package.json
36467
- const package_namespaceObject = JSON.parse('{"name":"@check-run-reporter/cli","version":"1.10.0","description":"A GitHub action for uploading structured test reports to > [check-run-reporter.com](https://www.check-run-reporter.com).","bin":{"crr":"./dist/ncc/index.js"},"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","engines":{"node":">=14","npm":">=7"},"scripts":{"build":"if command -v gmake 2>/dev/null; then gmake all; else make all; fi","build:types":"tsc --emitDeclarationOnly","eslint":"eslint ${ESLINT_FORMAT_OPTIONS:-} --ignore-path .gitignore","lint":"npm-run-all --continue-on-error --parallel lint:*","lint:changelog":"commitlint --from origin/main --to HEAD","lint:es":"npm run --silent eslint -- .","prelint:types":"mkdirp reports/style","lint:types":"bash -c \\"tsc --noEmit $TSC_OPTIONS\\" ","test":"TZ=UTC jest","prepare":"husky install"},"repository":{"type":"git","url":"git+https://github.com/check-run-reporter/integrations.git"},"keywords":[],"author":"Ian Remmel, LLC","license":"MIT","bugs":{"url":"https://github.com/check-run-reporter/integrations/issues"},"homepage":"https://www.check-run-reporter.com","devDependencies":{"@babel/cli":"^7.15.7","@babel/core":"^7.16.0","@babel/preset-env":"^7.16.5","@babel/preset-typescript":"^7.15.0","@babel/register":"^7.15.3","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@ianwremmel/eslint-plugin-ianwremmel":"^4.4.0","@semantic-release/exec":"^6.0.3","@types/glob":"^7.1.4","@types/jest":"^27.0.2","@types/lodash":"^4.14.178","@types/nock":"^11.1.0","@types/node":"^14.17.17","@typescript-eslint/eslint-plugin":"^4.33.0","@typescript-eslint/parser":"^4.33.0","@vercel/ncc":"^0.31.1","babel-jest":"^27.2.1","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-babel":"^5.3.1","eslint-plugin-compat":"^3.13.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-markdown":"^2.2.1","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.0","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","jest":"^27.2.5","jest-junit":"^13.0.0","lint-staged":"^11.2.0","markdown-toc":"^1.2.0","memfs":"^3.3.0","nock":"^13.1.3","npm-run-all":"^4.1.5","pkg":"^5.3.2","prettier":"^2.4.1","rimraf":"^3.0.2","semantic-release":"^18.0.0","semver":"^7.3.5","typescript":"^4.4.3"},"lint-staged":{"*.js":"npm run eslint -- ","*.ts":"npm run eslint -- "},"dependencies":{"axios":"^0.24.0","axios-retry":"^3.1.9","ci-info":"^3.2.0","form-data":"^4.0.0","glob":"^7.2.0","lodash":"^4.17.21","yargs":"^17.1.1"},"publishConfig":{"access":"public"},"workspaces":["integrations/action"]}');
36487
+ const package_namespaceObject = JSON.parse('{"name":"@check-run-reporter/cli","version":"1.10.1","description":"A GitHub action for uploading structured test reports to > [check-run-reporter.com](https://www.check-run-reporter.com).","bin":{"crr":"./dist/ncc/index.js"},"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/types/index.d.ts","engines":{"node":">=14","npm":">=7"},"scripts":{"build":"if command -v gmake 2>/dev/null; then gmake all; else make all; fi","build:types":"tsc --emitDeclarationOnly","eslint":"eslint ${ESLINT_FORMAT_OPTIONS:-} --ignore-path .gitignore","lint":"npm-run-all --continue-on-error --parallel lint:*","lint:changelog":"commitlint --from origin/main --to HEAD","lint:es":"npm run --silent eslint -- .","prelint:types":"mkdirp reports/style","lint:types":"bash -c \\"tsc --noEmit $TSC_OPTIONS\\" ","test":"TZ=UTC jest","prepare":"husky install"},"repository":{"type":"git","url":"git+https://github.com/check-run-reporter/integrations.git"},"keywords":[],"author":"Ian Remmel, LLC","license":"MIT","bugs":{"url":"https://github.com/check-run-reporter/integrations/issues"},"homepage":"https://www.check-run-reporter.com","devDependencies":{"@babel/cli":"^7.15.7","@babel/core":"^7.16.0","@babel/preset-env":"^7.16.5","@babel/preset-typescript":"^7.15.0","@babel/register":"^7.15.3","@commitlint/cli":"^13.1.0","@commitlint/config-conventional":"^13.1.0","@ianwremmel/eslint-plugin-ianwremmel":"^4.4.0","@semantic-release/exec":"^6.0.3","@types/glob":"^7.1.4","@types/jest":"^27.0.2","@types/lodash":"^4.14.178","@types/nock":"^11.1.0","@types/node":"^14.17.17","@typescript-eslint/eslint-plugin":"^4.33.0","@typescript-eslint/parser":"^4.33.0","@vercel/ncc":"^0.31.1","babel-jest":"^27.2.1","eslint":"^7.32.0","eslint-config-prettier":"^8.3.0","eslint-plugin-babel":"^5.3.1","eslint-plugin-compat":"^3.13.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.24.2","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-markdown":"^2.2.1","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.26.0","eslint-plugin-react-hooks":"^4.2.0","husky":"^7.0.4","jest":"^27.2.5","jest-junit":"^13.0.0","lint-staged":"^11.2.0","markdown-toc":"^1.2.0","memfs":"^3.3.0","nock":"^13.1.3","npm-run-all":"^4.1.5","pkg":"^5.3.2","prettier":"^2.4.1","rimraf":"^3.0.2","semantic-release":"^18.0.0","semver":"^7.3.5","typescript":"^4.4.3"},"lint-staged":{"*.js":"npm run eslint -- ","*.ts":"npm run eslint -- "},"dependencies":{"axios":"^0.24.0","axios-retry":"^3.1.9","ci-info":"^3.2.0","form-data":"^4.0.0","glob":"^7.2.0","lodash":"^4.17.21","yargs":"^17.1.1"},"publishConfig":{"access":"public"},"workspaces":["integrations/action"]}');
36468
36488
;// CONCATENATED MODULE: ../../src/lib/axios.ts
36469
36489
36470
36490
@@ -36917,6 +36937,7 @@ async function findReports() {
36917
36937
* Wrapper around split to adapt it for github actions
36918
36938
*/
36919
36939
async function doSplit({
36940
+ hostname,
36920
36941
label,
36921
36942
tests,
36922
36943
token,
@@ -36937,6 +36958,7 @@ async function doSplit({
36937
36958
const {
36938
36959
filenames
36939
36960
} = await (0, _split.split)({
36961
+ hostname,
36940
36962
label,
36941
36963
nodeCount: Number(nodeCount),
36942
36964
nodeIndex: Number(nodeIndex),
@@ -36971,12 +36993,14 @@ async function main() {
36971
36993
// For lack of a better pattern, we'll default to the same pattern that GitHub
36972
36994
// uses for checks at the bottom of the PR.
36973
36995
const label = core.getInput('label') || `${github.context.workflow} / ${github.context.job}`;
36996
+ const hostname = core.getInput('hostname');
36974
36997
const token = core.getInput('token');
36975
36998
const url = core.getInput('url');
36976
36999
const tests = core.getInput('tests');
36977
37000
36978
37001
if (tests) {
36979
37002
return await doSplit({
37003
+ hostname,
36980
37004
label,
36981
37005
tests,
36982
37006
token,
@@ -36988,6 +37012,7 @@ async function main() {
36988
37012
const files = await findReports();
36989
37013
const sha = determineSha();
36990
37014
await (0, _src.submit)({
37015
+ hostname,
36991
37016
label,
36992
37017
report: files,
36993
37018
root,
0 commit comments