mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 03:57:27 +00:00
Add default globals
This commit is contained in:
parent
88183f022f
commit
209c8fe2bb
2 changed files with 4 additions and 6 deletions
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
|
|
@ -1510,13 +1510,10 @@ function main() {
|
|||
const github = new _actions_github__WEBPACK_IMPORTED_MODULE_1__.GitHub(token, opts);
|
||||
const script = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('script', { required: true });
|
||||
const fn = wrapFunction(script);
|
||||
const result = yield vm__WEBPACK_IMPORTED_MODULE_2__.runInNewContext(fn, {
|
||||
github,
|
||||
const result = yield vm__WEBPACK_IMPORTED_MODULE_2__.runInNewContext(fn, Object.assign({}, global, { github,
|
||||
console,
|
||||
context: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context,
|
||||
actions: { core: _actions_core__WEBPACK_IMPORTED_MODULE_0__ },
|
||||
require: __webpack_require__(875) // Otherwise, the build step will compile this incorrectly.
|
||||
}, {
|
||||
context: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context, actions: { core: _actions_core__WEBPACK_IMPORTED_MODULE_0__ }, require: __webpack_require__(875) // Otherwise, the build step will compile this incorrectly.
|
||||
}), {
|
||||
lineOffset: -1
|
||||
});
|
||||
let encoding = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('result-encoding');
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ async function main() {
|
|||
const result = await vm.runInNewContext(
|
||||
fn,
|
||||
{
|
||||
...global,
|
||||
github,
|
||||
console,
|
||||
context,
|
||||
|
|
|
|||
Loading…
Reference in a new issue