Skip to content

Commit

Permalink
updates the workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
ibakshay committed Feb 9, 2023
1 parent 2ad8691 commit ff0f6e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ exports.isPersonalAccessTokenPresent = exports.getPATOctokit = exports.octokit =
const github_1 = __webpack_require__(469);
const core = __importStar(__webpack_require__(470));
const githubActionsDefaultToken = process.env.GITHUB_TOKEN;
const personalAcessToken = process.env.PERSONAL_ACCESS_TOKEN;
const personalAccessToken = process.env.PERSONAL_ACCESS_TOKEN;
exports.octokit = (0, github_1.getOctokit)(githubActionsDefaultToken);
/*export async function getOctokitClient() {
if (isPersonalAccessTokenPresent()) {
Expand All @@ -197,11 +197,11 @@ function getPATOctokit() {
if (!isPersonalAccessTokenPresent()) {
core.setFailed(`Please add a personal access token as an environment variable for writing signatures in a remote repository/organization as mentioned in the README.md file`);
}
return (0, github_1.getOctokit)(personalAcessToken);
return (0, github_1.getOctokit)(personalAccessToken);
}
exports.getPATOctokit = getPATOctokit;
function isPersonalAccessTokenPresent() {
return personalAcessToken !== undefined && personalAcessToken !== '';
return personalAccessToken !== undefined && personalAccessToken !== '';
}
exports.isPersonalAccessTokenPresent = isPersonalAccessTokenPresent;

Expand Down
6 changes: 3 additions & 3 deletions src/octokit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getOctokit } from '@actions/github'
import * as core from '@actions/core'

const githubActionsDefaultToken = process.env.GITHUB_TOKEN
const personalAcessToken = process.env.PERSONAL_ACCESS_TOKEN as string
const personalAccessToken = process.env.PERSONAL_ACCESS_TOKEN as string

export const octokit = getOctokit(githubActionsDefaultToken as string)

Expand All @@ -19,9 +19,9 @@ export function getPATOctokit() {
`Please add a personal access token as an environment variable for writing signatures in a remote repository/organization as mentioned in the README.md file`
)
}
return getOctokit(personalAcessToken)
return getOctokit(personalAccessToken)
}

export function isPersonalAccessTokenPresent(): boolean {
return personalAcessToken !== undefined && personalAcessToken !== ''
return personalAccessToken !== undefined && personalAccessToken !== ''
}

0 comments on commit ff0f6e5

Please sign in to comment.