Remove redundant method implementation

This commit is contained in:
daz 2024-03-21 18:59:05 -06:00 committed by Daz DeBoer
parent ef7196c315
commit a6050d4c14
5 changed files with 7 additions and 16 deletions

View File

@ -140593,7 +140593,7 @@ function downloadDependencyGraphs() {
const workspaceDirectory = layout.workspaceDirectory();
const findBy = github.context.payload.workflow_run
? {
token: getGithubToken(),
token: (0, input_params_1.getGithubToken)(),
workflowRunId: github.context.payload.workflow_run.id,
repositoryName: github.context.repo.repo,
repositoryOwner: github.context.repo.owner
@ -140629,10 +140629,7 @@ function warnOrFail(option, error) {
core.warning(`Failed to ${option} dependency graph. Will continue.\n${String(error)}`);
}
function getOctokit() {
return github.getOctokit(getGithubToken());
}
function getGithubToken() {
return core.getInput('github-token', { required: true });
return github.getOctokit((0, input_params_1.getGithubToken)());
}
function getRelativePathFromWorkspace(file) {
const workspaceDirectory = layout.workspaceDirectory();

File diff suppressed because one or more lines are too long

View File

@ -138046,7 +138046,7 @@ function downloadDependencyGraphs() {
const workspaceDirectory = layout.workspaceDirectory();
const findBy = github.context.payload.workflow_run
? {
token: getGithubToken(),
token: (0, input_params_1.getGithubToken)(),
workflowRunId: github.context.payload.workflow_run.id,
repositoryName: github.context.repo.repo,
repositoryOwner: github.context.repo.owner
@ -138082,10 +138082,7 @@ function warnOrFail(option, error) {
core.warning(`Failed to ${option} dependency graph. Will continue.\n${String(error)}`);
}
function getOctokit() {
return github.getOctokit(getGithubToken());
}
function getGithubToken() {
return core.getInput('github-token', { required: true });
return github.getOctokit((0, input_params_1.getGithubToken)());
}
function getRelativePathFromWorkspace(file) {
const workspaceDirectory = layout.workspaceDirectory();

File diff suppressed because one or more lines are too long

View File

@ -14,6 +14,7 @@ import {PostActionJobFailure} from './errors'
import {
DependencyGraphOption,
getDependencyGraphContinueOnFailure,
getGithubToken,
getJobMatrix,
getArtifactRetentionDays
} from './input-params'
@ -192,10 +193,6 @@ function getOctokit(): InstanceType<typeof GitHub> {
return github.getOctokit(getGithubToken())
}
function getGithubToken(): string {
return core.getInput('github-token', {required: true})
}
function getRelativePathFromWorkspace(file: string): string {
const workspaceDirectory = layout.workspaceDirectory()
return path.relative(workspaceDirectory, file)