Skip to content

Commit

Permalink
debug 🔨
Browse files Browse the repository at this point in the history
  • Loading branch information
ibakshay committed Jul 20, 2022
1 parent adf5016 commit 4601203
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 5 deletions.
143 changes: 143 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/main.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { context } from '@actions/github'
import { setupClaCheck } from './setupClaCheck'
import { lockPullRequest } from './pullrequest/pullRequestLock'
import { octokit } from './octokit'

import * as core from '@actions/core'
import * as input from './shared/getInputs'
Expand All @@ -10,6 +11,8 @@ import * as input from './shared/getInputs'
export async function run() {
try {
core.info(`CLA Assistant GitHub Action bot has started the process`)

console.log(JSON.stringify(context, null, 4))

/*
* using a `string` true or false purposely as github action input cannot have a boolean value
Expand Down
7 changes: 3 additions & 4 deletions src/octokit.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { getOctokit } from '@actions/github'

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)
export const octokitUsingPAT = isPersonalAccessTokenPresent() ? getOctokit(personalAcessToken as string) : octokit
export const octokitUsingPAT = isPersonalAccessTokenPresent() ? getOctokit(personalAccessToken as string) : octokit

export function isPersonalAccessTokenPresent(): boolean {

return (typeof personalAcessToken !== "undefined")
return personalAccessToken !== ""
}

0 comments on commit 4601203

Please sign in to comment.