mirror of
https://github.com/MillironX/setup-nextflow.git
synced 2024-11-23 10:09:54 +00:00
refactor: Outsource API calls to OctokitWrapper
This commit is contained in:
parent
9c201e4232
commit
91a673d1c0
1 changed files with 3 additions and 10 deletions
13
src/main.ts
13
src/main.ts
|
@ -29,16 +29,9 @@ async function run(): Promise<void> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup the API
|
// Setup the API
|
||||||
let octokit: InstanceType<typeof GitHub> | undefined
|
const octokit = await setup_octokit(token)
|
||||||
try {
|
|
||||||
octokit = github.getOctokit(token)
|
const releases = await pull_releases(octokit)
|
||||||
} catch (e: unknown) {
|
|
||||||
if (e instanceof Error) {
|
|
||||||
core.setFailed(
|
|
||||||
`Could not authenticate to GitHub Releases API with provided token\n${e.message}`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the release info for the desired release
|
// Get the release info for the desired release
|
||||||
let release = {}
|
let release = {}
|
||||||
|
|
Loading…
Reference in a new issue