mirror of
https://github.com/peter-evans/repository-dispatch.git
synced 2026-06-11 11:21:25 +00:00
Merge pull request #80 from peter-evans/update-dependencies
Update dependencies
This commit is contained in:
48
dist/index.js
vendored
48
dist/index.js
vendored
@@ -47,7 +47,7 @@ function run() {
|
||||
eventType: core.getInput('event-type'),
|
||||
clientPayload: core.getInput('client-payload')
|
||||
};
|
||||
core.debug(`Inputs: ${util_1.inspect(inputs)}`);
|
||||
core.debug(`Inputs: ${(0, util_1.inspect)(inputs)}`);
|
||||
const [owner, repo] = inputs.repository.split('/');
|
||||
const octokit = github.getOctokit(inputs.token);
|
||||
yield octokit.rest.repos.createDispatchEvent({
|
||||
@@ -58,7 +58,7 @@ function run() {
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
core.debug(util_1.inspect(error));
|
||||
core.debug((0, util_1.inspect)(error));
|
||||
if (error.status == 404) {
|
||||
core.setFailed('Repository not found, OR token has insufficient permissions.');
|
||||
}
|
||||
@@ -206,7 +206,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||
const command_1 = __nccwpck_require__(351);
|
||||
const file_command_1 = __nccwpck_require__(717);
|
||||
const utils_1 = __nccwpck_require__(278);
|
||||
@@ -384,19 +384,30 @@ exports.debug = debug;
|
||||
/**
|
||||
* Adds an error issue
|
||||
* @param message error issue message. Errors will be converted to string via toString()
|
||||
* @param properties optional properties to add to the annotation.
|
||||
*/
|
||||
function error(message) {
|
||||
command_1.issue('error', message instanceof Error ? message.toString() : message);
|
||||
function error(message, properties = {}) {
|
||||
command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
exports.error = error;
|
||||
/**
|
||||
* Adds an warning issue
|
||||
* Adds a warning issue
|
||||
* @param message warning issue message. Errors will be converted to string via toString()
|
||||
* @param properties optional properties to add to the annotation.
|
||||
*/
|
||||
function warning(message) {
|
||||
command_1.issue('warning', message instanceof Error ? message.toString() : message);
|
||||
function warning(message, properties = {}) {
|
||||
command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
exports.warning = warning;
|
||||
/**
|
||||
* Adds a notice issue
|
||||
* @param message notice issue message. Errors will be converted to string via toString()
|
||||
* @param properties optional properties to add to the annotation.
|
||||
*/
|
||||
function notice(message, properties = {}) {
|
||||
command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);
|
||||
}
|
||||
exports.notice = notice;
|
||||
/**
|
||||
* Writes info to log with console.log.
|
||||
* @param message info message
|
||||
@@ -530,7 +541,7 @@ exports.issueCommand = issueCommand;
|
||||
// We use any as a valid input type
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.toCommandValue = void 0;
|
||||
exports.toCommandProperties = exports.toCommandValue = void 0;
|
||||
/**
|
||||
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||
* @param input input to sanitize into a string
|
||||
@@ -545,6 +556,25 @@ function toCommandValue(input) {
|
||||
return JSON.stringify(input);
|
||||
}
|
||||
exports.toCommandValue = toCommandValue;
|
||||
/**
|
||||
*
|
||||
* @param annotationProperties
|
||||
* @returns The command properties to send with the actual annotation command
|
||||
* See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646
|
||||
*/
|
||||
function toCommandProperties(annotationProperties) {
|
||||
if (!Object.keys(annotationProperties).length) {
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
title: annotationProperties.title,
|
||||
line: annotationProperties.startLine,
|
||||
endLine: annotationProperties.endLine,
|
||||
col: annotationProperties.startColumn,
|
||||
endColumn: annotationProperties.endColumn
|
||||
};
|
||||
}
|
||||
exports.toCommandProperties = toCommandProperties;
|
||||
//# sourceMappingURL=utils.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
8954
package-lock.json
generated
8954
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -27,22 +27,22 @@
|
||||
},
|
||||
"homepage": "https://github.com/peter-evans/repository-dispatch#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "1.4.0",
|
||||
"@actions/core": "1.5.0",
|
||||
"@actions/github": "5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "26.0.24",
|
||||
"@types/node": "16.4.0",
|
||||
"@typescript-eslint/parser": "4.28.4",
|
||||
"@vercel/ncc": "0.29.0",
|
||||
"eslint": "7.31.0",
|
||||
"eslint-plugin-github": "4.1.5",
|
||||
"@types/jest": "27.0.1",
|
||||
"@types/node": "16.7.10",
|
||||
"@typescript-eslint/parser": "4.30.0",
|
||||
"@vercel/ncc": "0.30.0",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-plugin-github": "4.2.0",
|
||||
"eslint-plugin-jest": "24.4.0",
|
||||
"jest": "27.0.6",
|
||||
"jest-circus": "27.0.6",
|
||||
"jest": "27.1.0",
|
||||
"jest-circus": "27.1.0",
|
||||
"js-yaml": "4.1.0",
|
||||
"prettier": "2.3.2",
|
||||
"ts-jest": "27.0.4",
|
||||
"typescript": "4.3.5"
|
||||
"ts-jest": "27.0.5",
|
||||
"typescript": "4.4.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ async function run(): Promise<void> {
|
||||
event_type: inputs.eventType,
|
||||
client_payload: JSON.parse(inputs.clientPayload)
|
||||
})
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
core.debug(inspect(error))
|
||||
if (error.status == 404) {
|
||||
core.setFailed(
|
||||
|
||||
Reference in New Issue
Block a user