Commit a6050d4c authored by daz's avatar daz Committed by Daz DeBoer
Browse files

Remove redundant method implementation

parent ef7196c3
Loading
Loading
Loading
Loading
+2 −5
Changes for dist/setup-gradle/main/index.js: 2 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -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();
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+2 −5
Changes for dist/setup-gradle/post/index.js: 2 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -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();
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −4
Changes for sources/src/dependency-graph.ts: 1 added line, 4 removed lines.
Original line number Diff line number Diff line
@@ -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)