mirror of
https://github.com/actions/github-script.git
synced 2026-02-07 19:47:26 +00:00
adding @qctions/exec
This commit is contained in:
parent
f9d46abb2a
commit
854d2138dc
2 changed files with 7 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as exec from '@actions/exec'
|
import * as exec from '@actions/exec'
|
||||||
import { Context } from '@actions/github/lib/context'
|
import {Context} from '@actions/github/lib/context'
|
||||||
import { GitHub } from '@actions/github/lib/utils'
|
import {GitHub} from '@actions/github/lib/utils'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
|
|
||||||
|
|
|
||||||
10
src/main.ts
10
src/main.ts
|
|
@ -1,10 +1,10 @@
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as exec from '@actions/exec'
|
import * as exec from '@actions/exec'
|
||||||
import { context, getOctokit } from '@actions/github'
|
import {context, getOctokit} from '@actions/github'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
import { callAsyncFunction } from './async-function'
|
import {callAsyncFunction} from './async-function'
|
||||||
import { wrapRequire } from './wrap-require'
|
import {wrapRequire} from './wrap-require'
|
||||||
|
|
||||||
process.on('unhandledRejection', handleError)
|
process.on('unhandledRejection', handleError)
|
||||||
main().catch(handleError)
|
main().catch(handleError)
|
||||||
|
|
@ -16,7 +16,7 @@ type Options = {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
const token = core.getInput('github-token', { required: true })
|
const token = core.getInput('github-token', {required: true})
|
||||||
const debug = core.getInput('debug')
|
const debug = core.getInput('debug')
|
||||||
const userAgent = core.getInput('user-agent')
|
const userAgent = core.getInput('user-agent')
|
||||||
const previews = core.getInput('previews')
|
const previews = core.getInput('previews')
|
||||||
|
|
@ -27,7 +27,7 @@ async function main(): Promise<void> {
|
||||||
if (previews != null) opts.previews = previews.split(',')
|
if (previews != null) opts.previews = previews.split(',')
|
||||||
|
|
||||||
const github = getOctokit(token, opts)
|
const github = getOctokit(token, opts)
|
||||||
const script = core.getInput('script', { required: true })
|
const script = core.getInput('script', {required: true})
|
||||||
|
|
||||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||||
const result = await callAsyncFunction(
|
const result = await callAsyncFunction(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue