Skip to content

Commit

Permalink
SCP-86 Sets token optional
Browse files Browse the repository at this point in the history
  • Loading branch information
francostramana committed Jan 29, 2024
1 parent 40d39b2 commit d46ca25
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
with:
# sbom-ignore: 'scanoss-ignore.json'
with-dependencies: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Print stdout scan command
run: echo "${{ steps.test-action.outputs.stdout-scan-command }}"
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ branding:
inputs:
github-token:
description: 'Your GitHub token'
required: true
required: false
output-path:
description: 'Output result file name'
required: false
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

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

4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion src/policies/policy-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export abstract class PolicyCheck {
constructor(checkName: string) {
const GITHUB_TOKEN = core.getInput('github-token');

Check warning on line 28 in src/policies/policy-check.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

'GITHUB_TOKEN' is assigned a value but never used

Check warning on line 28 in src/policies/policy-check.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

'GITHUB_TOKEN' is assigned a value but never used

this.octokit = getOctokit(GITHUB_TOKEN);
this.octokit = getOctokit('');
this.checkName = checkName;
this.checkRunId = UNINITIALIZED;
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/github.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function getSHA(): string {

export async function createCommentOnPR(message: string): Promise<void> {
const GITHUB_TOKEN = core.getInput('github-token');
const octokit = getOctokit(GITHUB_TOKEN);
const octokit = getOctokit('');

core.debug('Creating comment on PR');
octokit.rest.issues.createComment({
Expand Down

0 comments on commit d46ca25

Please sign in to comment.