mirror of
https://github.com/MillironX/setup-nextflow.git
synced 2024-11-25 18:59:55 +00:00
0aeab8d284
Co-authored-by: ewels <ewels@users.noreply.github.com>
12 lines
329 B
TypeScript
12 lines
329 B
TypeScript
export function getToken(first: boolean): string {
|
|
const token = process.env["GITHUB_TOKEN"] || ""
|
|
if (!token && first) {
|
|
/* eslint-disable-next-line no-console */
|
|
console.warn(
|
|
"Skipping GitHub tests. Set $GITHUB_TOKEN to run REST client and GraphQL client tests"
|
|
)
|
|
first = false
|
|
}
|
|
|
|
return token
|
|
}
|