Skip to content

Commit

Permalink
Adds token info
Browse files Browse the repository at this point in the history
  • Loading branch information
francostramana committed Jan 23, 2024
1 parent 9cfe36e commit c7e0c86
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
31 changes: 27 additions & 4 deletions dist/index.js

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

6 changes: 3 additions & 3 deletions src/libs/github-check.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { context, getOctokit } from '@actions/github'
import { getInput } from '@actions/core'
import * as core from '@actions/core'

const NO_INITIALIZATE = -1

Expand All @@ -11,7 +11,7 @@ export class GitHubCheck {
private checkRunId: number

constructor(checkName: string) {
const GITHUB_TOKEN = getInput('github-token') // TODO: move to inputs.ts file?
const GITHUB_TOKEN = core.getInput('github-token') // TODO: move to inputs.ts file?

this.octokit = getOctokit(GITHUB_TOKEN)
this.checkName = checkName
Expand All @@ -21,7 +21,7 @@ export class GitHubCheck {
async present(): Promise<any> {

Check warning on line 21 in src/libs/github-check.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected any. Specify a different type

Check warning on line 21 in src/libs/github-check.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected any. Specify a different type
// Promise<OctokitResponse>
const result = await this.octokit.rest.checks.create({
owner: context.repo.owner,
owner: context.actor,
repo: context.repo.repo,
name: this.checkName,
head_sha: context.sha
Expand Down

0 comments on commit c7e0c86

Please sign in to comment.