chore: indicate what needs to move out of the input class

pull/374/head
Webber 2022-04-03 15:25:02 +02:00
parent a0a1321fd8
commit 09a277e63f
4 changed files with 9 additions and 1 deletions

4
dist/index.js vendored
View File

@ -304,6 +304,7 @@ class BuildParameters {
customJob: input_1.default.customJob,
runNumber: input_1.default.runNumber,
branch: yield input_1.default.branch(),
// Todo - move this out of UserInput and into some class that determines additional information (as needed)
githubRepo: yield input_1.default.githubRepo(),
remoteBuildCluster: input_1.default.cloudRunnerCluster,
awsStackName: input_1.default.awsBaseStackName,
@ -3852,6 +3853,7 @@ class Input {
return __awaiter(this, void 0, void 0, function* () {
return (Input.getInput('GITHUB_REPOSITORY') ||
Input.getInput('GITHUB_REPO') ||
// todo - move this to some class specific for determining additional information
(yield git_repo_1.GitRepoReader.GetRemote()) ||
'game-ci/unity-builder');
});
@ -3859,6 +3861,7 @@ class Input {
static branch() {
return __awaiter(this, void 0, void 0, function* () {
if (yield git_repo_1.GitRepoReader.GetBranch()) {
// todo - move this to some class specific for determining additional information
return yield git_repo_1.GitRepoReader.GetBranch();
}
else if (Input.getInput(`GITHUB_REF`)) {
@ -3880,6 +3883,7 @@ class Input {
return Input.getInput(`GitSHA`);
}
else if (git_repo_1.GitRepoReader.GetSha()) {
// todo - move this to some class specific for determining additional information
return git_repo_1.GitRepoReader.GetSha();
}
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -116,6 +116,7 @@ class BuildParameters {
customJob: Input.customJob,
runNumber: Input.runNumber,
branch: await Input.branch(),
// Todo - move this out of UserInput and into some class that determines additional information (as needed)
githubRepo: await Input.githubRepo(),
remoteBuildCluster: Input.cloudRunnerCluster,
awsStackName: Input.awsBaseStackName,

View File

@ -45,6 +45,7 @@ class Input {
return (
Input.getInput('GITHUB_REPOSITORY') ||
Input.getInput('GITHUB_REPO') ||
// todo - move this to some class specific for determining additional information
(await GitRepoReader.GetRemote()) ||
'game-ci/unity-builder'
);
@ -52,6 +53,7 @@ class Input {
static async branch() {
if (await GitRepoReader.GetBranch()) {
// todo - move this to some class specific for determining additional information
return await GitRepoReader.GetBranch();
} else if (Input.getInput(`GITHUB_REF`)) {
return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, '');
@ -68,6 +70,7 @@ class Input {
} else if (Input.getInput(`GitSHA`)) {
return Input.getInput(`GitSHA`);
} else if (GitRepoReader.GetSha()) {
// todo - move this to some class specific for determining additional information
return GitRepoReader.GetSha();
}
}