@@ -32551,6 +32551,17 @@ const isTrue = (variable) => {
32551
32551
lowercase === 'y' ||
32552
32552
lowercase === 'yes');
32553
32553
};
32554
+ const getGitService = () => {
32555
+ const overrideGitService = core.getInput('git_service');
32556
+ const serverUrl = process.env.GITHUB_SERVER_URL;
32557
+ if (overrideGitService) {
32558
+ return overrideGitService;
32559
+ }
32560
+ else if (serverUrl !== undefined && serverUrl !== 'https://github.com') {
32561
+ return 'github_enterprise';
32562
+ }
32563
+ return 'github';
32564
+ };
32554
32565
const getToken = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
32555
32566
let token = core.getInput('token');
32556
32567
let url = core.getInput('url');
@@ -32571,7 +32582,7 @@ const getToken = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
32571
32582
});
32572
32583
const buildCommitExec = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
32573
32584
const commitParent = core.getInput('commit_parent');
32574
- const gitService = core.getInput('git_service' );
32585
+ const gitService = getGitService( );
32575
32586
const overrideBranch = core.getInput('override_branch');
32576
32587
const overrideCommit = core.getInput('override_commit');
32577
32588
const overridePr = core.getInput('override_pr');
@@ -32596,7 +32607,7 @@ const buildCommitExec = () => buildExec_awaiter(void 0, void 0, void 0, function
32596
32607
if (commitParent) {
32597
32608
commitExecArgs.push('--parent-sha', `${commitParent}`);
32598
32609
}
32599
- commitExecArgs.push('--git-service', `${gitService ? gitService : 'github' }`);
32610
+ commitExecArgs.push('--git-service', `${gitService}`);
32600
32611
if (overrideBranch) {
32601
32612
commitExecArgs.push('-B', `${overrideBranch}`);
32602
32613
}
@@ -32641,7 +32652,7 @@ const buildGeneralExec = () => {
32641
32652
return { args, verbose };
32642
32653
};
32643
32654
const buildReportExec = () => buildExec_awaiter(void 0, void 0, void 0, function* () {
32644
- const gitService = core.getInput('git_service' );
32655
+ const gitService = getGitService( );
32645
32656
const overrideCommit = core.getInput('override_commit');
32646
32657
const overridePr = core.getInput('override_pr');
32647
32658
const slug = core.getInput('slug');
@@ -32662,7 +32673,7 @@ const buildReportExec = () => buildExec_awaiter(void 0, void 0, void 0, function
32662
32673
if (token) {
32663
32674
reportOptions.env.CODECOV_TOKEN = token;
32664
32675
}
32665
- reportExecArgs.push('--git-service', `${gitService ? gitService : 'github' }`);
32676
+ reportExecArgs.push('--git-service', `${gitService}`);
32666
32677
if (overrideCommit) {
32667
32678
reportExecArgs.push('-C', `${overrideCommit}`);
32668
32679
}
@@ -32698,7 +32709,7 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
32698
32709
const file = core.getInput('file');
32699
32710
const files = core.getInput('files');
32700
32711
const flags = core.getInput('flags');
32701
- const gitService = core.getInput('git_service' );
32712
+ const gitService = getGitService( );
32702
32713
const handleNoReportsFound = isTrue(core.getInput('handle_no_reports_found'));
32703
32714
const jobCode = core.getInput('job_code');
32704
32715
const name = core.getInput('name');
@@ -32771,7 +32782,7 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
32771
32782
uploadExecArgs.push('-F', `${f}`);
32772
32783
});
32773
32784
}
32774
- uploadExecArgs.push('--git-service', `${gitService ? gitService : 'github' }`);
32785
+ uploadExecArgs.push('--git-service', `${gitService}`);
32775
32786
if (handleNoReportsFound) {
32776
32787
uploadExecArgs.push('--handle-no-reports-found');
32777
32788
}
0 commit comments