fix(inputs): adjust the default for the "branch" configuration

This commit is contained in:
cycjimmy 2019-10-28 15:10:20 +08:00
parent 56568e2822
commit e5c555a613
4 changed files with 20 additions and 9 deletions

View file

@ -2,7 +2,22 @@ const core = require('@actions/core');
const inputs = require('./inputs.json');
/**
* handleDryRunOption
* Handle Branch Option
* @returns {{}|{branch: string}}
*/
exports.handleBranchOption = () => {
const branchOption = {};
const branch = core.getInput(inputs.branch);
if (branch) {
branchOption.branch = branch;
}
return branchOption;
};
/**
* Handle DryRun Option
* @returns {{}|{dryRun: boolean}}
*/
exports.handleDryRunOption = () => {