Load remote config file

This commit is contained in:
cnagadya
2022-11-04 09:05:45 +00:00
parent 683cbc4872
commit 3b410dc4ad
4 changed files with 80 additions and 32 deletions
+8
View File
@@ -1,3 +1,5 @@
import * as core from '@actions/core'
import {Octokit} from 'octokit'
import spdxParse from 'spdx-expression-parse'
import {Changes} from './schemas'
@@ -38,3 +40,9 @@ export function isSPDXValid(license: string): boolean {
return false
}
}
export function octokitClient(token = 'repo-token'): Octokit {
return new Octokit({
auth: core.getInput(token, {required: true})
})
}