mirror of
https://github.com/actions/github-script.git
synced 2026-10-15 20:06:55 +00:00
Merge pull request #127 from MatisseHack/glob
Add @actions/glob as a script parameter
This commit is contained in:
11 files changed
+11307
-9
No files matched your search
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
@@ -16,6 +16,7 @@ arguments will be provided:
|
||||
- `context` An object containing the [context of the workflow
|
||||
run](https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts)
|
||||
- `core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) package
|
||||
- `glob` A reference to the [@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob) package
|
||||
- `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/main/packages/io) package
|
||||
|
||||
Since the `script` is just a function body, these values will already be
|
||||
|
||||
Vendored
+2211
-1
File diff suppressed because it is too large.
Load diff
Generated
+9090
-7
File diff suppressed because it is too large.
Load diff
@@ -37,6 +37,7 @@
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/github": "^4.0.0",
|
||||
"@actions/glob": "^0.1.1",
|
||||
"@actions/io": "^1.0.2",
|
||||
"@octokit/core": "^3.2.1",
|
||||
"@octokit/plugin-paginate-rest": "^2.6.0",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import * as core from '@actions/core'
|
||||
import {Context} from '@actions/github/lib/context'
|
||||
import {GitHub} from '@actions/github/lib/utils'
|
||||
import * as glob from '@actions/glob'
|
||||
import * as io from '@actions/io'
|
||||
|
||||
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
|
||||
@@ -9,6 +10,7 @@ type AsyncFunctionArguments = {
|
||||
context: Context
|
||||
core: typeof core
|
||||
github: InstanceType<typeof GitHub>
|
||||
glob: typeof glob
|
||||
io: typeof io
|
||||
require: NodeRequire
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
import * as core from '@actions/core'
|
||||
import {context, getOctokit} from '@actions/github'
|
||||
import * as glob from '@actions/glob'
|
||||
import * as io from '@actions/io'
|
||||
import {callAsyncFunction} from './async-function'
|
||||
|
||||
@@ -28,7 +29,7 @@ async function main(): Promise<void> {
|
||||
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||
const result = await callAsyncFunction(
|
||||
{require: require, github, context, core, io},
|
||||
{require: require, github, context, core, glob, io},
|
||||
script
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user