Skip to content

Commit 363a65a

Browse files
feat: add network params (#1365)
1 parent 640b86a commit 363a65a

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ inputs:
5656
name:
5757
description: 'User defined upload name. Visible in Codecov UI'
5858
required: false
59+
network_filter:
60+
description: 'Specify a filter on the files listed in the network section of the Codecov report. This will only add files whose path begin with the specified filter. Useful for upload-specific path fixing'
61+
required: false
62+
network_prefix:
63+
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
64+
required: false
5965
os:
6066
description: 'Override the assumed OS. Options are linux | macos | windows.'
6167
required: false

dist/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32713,6 +32713,8 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
3271332713
const handleNoReportsFound = isTrue(core.getInput('handle_no_reports_found'));
3271432714
const jobCode = core.getInput('job_code');
3271532715
const name = core.getInput('name');
32716+
const networkFilter = core.getInput('network_filter');
32717+
const networkPrefix = core.getInput('network_prefix');
3271632718
const os = core.getInput('os');
3271732719
const overrideBranch = core.getInput('override_branch');
3271832720
const overrideBuild = core.getInput('override_build');
@@ -32792,6 +32794,12 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
3279232794
if (name) {
3279332795
uploadExecArgs.push('-n', `${name}`);
3279432796
}
32797+
if (networkFilter) {
32798+
uploadExecArgs.push('--network-filter', `${networkFilter}`);
32799+
}
32800+
if (networkPrefix) {
32801+
uploadExecArgs.push('--network-prefix', `${networkPrefix}`);
32802+
}
3279532803
if (overrideBranch) {
3279632804
uploadExecArgs.push('-B', `${overrideBranch}`);
3279732805
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/buildExec.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ test('upload args', async () => {
8787
'override_build_url': 'https://example.com/build/2',
8888
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
8989
'override_pr': '2',
90+
'network_filter': 'subA/',
91+
'network_prefix': 'forA/',
9092
'plugin': 'xcode',
9193
'plugins': 'pycoverage,compress-pycoverage',
9294
'report_code': 'testCode',
@@ -130,6 +132,10 @@ test('upload args', async () => {
130132
'32',
131133
'-n',
132134
'codecov',
135+
'--network-filter',
136+
'subA/',
137+
'--network-prefix',
138+
'forA/',
133139
'-B',
134140
'thomasrockhu/test',
135141
'-b',

src/buildExec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ const buildUploadExec = async () => {
206206
const handleNoReportsFound = isTrue(core.getInput('handle_no_reports_found'));
207207
const jobCode = core.getInput('job_code');
208208
const name = core.getInput('name');
209+
const networkFilter = core.getInput('network_filter');
210+
const networkPrefix = core.getInput('network_prefix');
209211
const os = core.getInput('os');
210212
const overrideBranch = core.getInput('override_branch');
211213
const overrideBuild = core.getInput('override_build');
@@ -289,6 +291,12 @@ const buildUploadExec = async () => {
289291
if (name) {
290292
uploadExecArgs.push('-n', `${name}`);
291293
}
294+
if (networkFilter) {
295+
uploadExecArgs.push('--network-filter', `${networkFilter}`);
296+
}
297+
if (networkPrefix) {
298+
uploadExecArgs.push('--network-prefix', `${networkPrefix}`);
299+
}
292300
if (overrideBranch) {
293301
uploadExecArgs.push('-B', `${overrideBranch}`);
294302
}

0 commit comments

Comments
 (0)