mirror of
https://github.com/actions/github-script.git
synced 2026-04-07 14:49:25 +00:00
Add pull-request-test workflow
This commit is contained in:
parent
89e3c40f24
commit
4789b35ac3
6 changed files with 1750 additions and 17498 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import * as core from '@actions/core'
|
||||
import {GitHub} from '@actions/github'
|
||||
import {Context} from '@actions/github/lib/context'
|
||||
import {GitHub} from '@actions/github/lib/utils'
|
||||
import * as io from '@actions/io'
|
||||
|
||||
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
||||
|
|
@ -8,7 +8,7 @@ const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
|||
type AsyncFunctionArguments = {
|
||||
context: Context
|
||||
core: typeof core
|
||||
github: GitHub
|
||||
github: InstanceType<typeof GitHub>
|
||||
io: typeof io
|
||||
require: NodeRequire
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import * as core from '@actions/core'
|
||||
import {context, GitHub} from '@actions/github'
|
||||
import {context, getOctokit} from '@actions/github'
|
||||
import * as io from '@actions/io'
|
||||
import {callAsyncFunction} from './async-function'
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ async function main(): Promise<void> {
|
|||
if (userAgent != null) opts.userAgent = userAgent
|
||||
if (previews != null) opts.previews = previews.split(',')
|
||||
|
||||
const github = new GitHub(token, opts)
|
||||
const github = getOctokit(token, opts)
|
||||
const script = core.getInput('script', {required: true})
|
||||
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue