Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
TreTuna committed May 4, 2020
1 parent 7e34560 commit 6476439
Showing 1 changed file with 52 additions and 19 deletions.
71 changes: 52 additions & 19 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,9 @@ module.exports = require("tls");
/***/ }),

/***/ 18:
/***/ (function() {
/***/ (function(module) {

eval("require")("encoding");
module.exports = eval("require")("encoding");


/***/ }),
Expand Down Expand Up @@ -2023,16 +2023,15 @@ async function run() {
});

console.log(
`Pull request (${pullRequest.number}) successful! You can view it here: ${pullRequest.url}.`
`Pull request (${pullRequest.number}) successful! You can view it here: ${pullRequest.url}.`
);

core.setOutput("PULL_REQUEST_URL", pullRequest.url.toString())
core.setOutput("PULL_REQUEST_URL", pullRequest.url.toString());
core.setOutput("PULL_REQUEST_NUMBER", pullRequest.number.toString());

} else {
console.log(
`There is already a pull request (${currentPull.number}) to ${toBranch} from ${fromBranch}.`,
`You can view it here: ${currentPull.url}`
`There is already a pull request (${currentPull.number}) to ${toBranch} from ${fromBranch}.`,
`You can view it here: ${currentPull.url}`
);

core.setOutput("PULL_REQUEST_URL", currentPull.url.toString());
Expand Down Expand Up @@ -5099,14 +5098,28 @@ class Command {
return cmdStr;
}
}
/**
* Sanitizes an input into a string so it can be passed into issueCommand safely
* @param input input to sanitize into a string
*/
function toCommandValue(input) {
if (input === null || input === undefined) {
return '';
}
else if (typeof input === 'string' || input instanceof String) {
return input;
}
return JSON.stringify(input);
}
exports.toCommandValue = toCommandValue;
function escapeData(s) {
return (s || '')
return toCommandValue(s)
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A');
}
function escapeProperty(s) {
return (s || '')
return toCommandValue(s)
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A')
Expand Down Expand Up @@ -7115,11 +7128,13 @@ var ExitCode;
/**
* Sets env variable for this action and future actions in the job
* @param name the name of the variable to set
* @param val the value of the variable
* @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function exportVariable(name, val) {
process.env[name] = val;
command_1.issueCommand('set-env', { name }, val);
const convertedVal = command_1.toCommandValue(val);
process.env[name] = convertedVal;
command_1.issueCommand('set-env', { name }, convertedVal);
}
exports.exportVariable = exportVariable;
/**
Expand Down Expand Up @@ -7158,12 +7173,22 @@ exports.getInput = getInput;
* Sets the value of an output.
*
* @param name name of the output to set
* @param value value to store
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setOutput(name, value) {
command_1.issueCommand('set-output', { name }, value);
}
exports.setOutput = setOutput;
/**
* Enables or disables the echoing of commands into stdout for the rest of the step.
* Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
*
*/
function setCommandEcho(enabled) {
command_1.issue('echo', enabled ? 'on' : 'off');
}
exports.setCommandEcho = setCommandEcho;
//-----------------------------------------------------------------------
// Results
//-----------------------------------------------------------------------
Expand All @@ -7180,6 +7205,13 @@ exports.setFailed = setFailed;
//-----------------------------------------------------------------------
// Logging Commands
//-----------------------------------------------------------------------
/**
* Gets whether Actions Step Debug is on or not
*/
function isDebug() {
return process.env['RUNNER_DEBUG'] === '1';
}
exports.isDebug = isDebug;
/**
* Writes debug message to user log
* @param message debug message
Expand All @@ -7190,18 +7222,18 @@ function debug(message) {
exports.debug = debug;
/**
* Adds an error issue
* @param message error issue message
* @param message error issue message. Errors will be converted to string via toString()
*/
function error(message) {
command_1.issue('error', message);
command_1.issue('error', message instanceof Error ? message.toString() : message);
}
exports.error = error;
/**
* Adds an warning issue
* @param message warning issue message
* @param message warning issue message. Errors will be converted to string via toString()
*/
function warning(message) {
command_1.issue('warning', message);
command_1.issue('warning', message instanceof Error ? message.toString() : message);
}
exports.warning = warning;
/**
Expand Down Expand Up @@ -7259,8 +7291,9 @@ exports.group = group;
* Saves state for current action, the state can only be retrieved by this action's post job execution.
*
* @param name name of the state to store
* @param value value to store
* @param value value to store. Non-string values will be converted to a string via JSON.stringify
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function saveState(name, value) {
command_1.issueCommand('save-state', { name }, value);
}
Expand Down Expand Up @@ -25284,4 +25317,4 @@ function onceStrict (fn) {

/***/ })

/******/ });
/******/ });

0 comments on commit 6476439

Please sign in to comment.