Skip to content

Commit 08979b2

Browse files
Merge pull request #93 from TheDragonCode/build/app-ve88ldl
Application compiled successfully
2 parents d715f50 + 55f02a2 commit 08979b2

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

dist/index.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34369,12 +34369,13 @@ const main_1 = __importDefault(__nccwpck_require__(1730));
3436934369
/***/ }),
3437034370

3437134371
/***/ 5620:
34372-
/***/ ((__unused_webpack_module, exports) => {
34372+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
3437334373

3437434374
"use strict";
3437534375

3437634376
Object.defineProperty(exports, "__esModule", ({ value: true }));
3437734377
exports.defaultConfig = exports.defaultPullRequest = exports.defaultCommit = exports.defaultAuthor = exports.defaultImage = exports.defaultPackage = void 0;
34378+
const inputs_1 = __nccwpck_require__(9612);
3437834379
exports.defaultPackage = {
3437934380
manager: "auto",
3438034381
global: false,
@@ -34404,7 +34405,7 @@ exports.defaultPullRequest = {
3440434405
labels: ["preview"],
3440534406
};
3440634407
exports.defaultConfig = {
34407-
readme: "README.md",
34408+
readme: inputs_1.README_PATH.defaultValue,
3440834409
package: exports.defaultPackage,
3440934410
image: exports.defaultImage,
3441034411
repository: {
@@ -34458,7 +34459,7 @@ const config_1 = __nccwpck_require__(7799);
3445834459
const defaults_1 = __nccwpck_require__(5620);
3445934460
const previewUpdater = async () => {
3446034461
// Inputs
34461-
const { token, configPath } = (0, inputs_1.parse)();
34462+
const { token, configPath, readmePath } = (0, inputs_1.parse)();
3446234463
// Credentials
3446334464
const credentials = {
3446434465
owner: github_1.context.repo.owner,
@@ -34476,7 +34477,7 @@ const previewUpdater = async () => {
3447634477
}, configPath, _repo);
3447734478
// Read names
3447834479
const packageLock = (0, packageManagers_1.getPackageManager)(config);
34479-
config.readme ||= defaults_1.defaultConfig.readme || "README.md";
34480+
config.readme = readmePath;
3448034481
config.package ||= defaults_1.defaultPackage;
3448134482
config.data ||= {};
3448234483
config.package.name ||= packageLock.name;
@@ -34810,23 +34811,27 @@ exports.getImages = getImages;
3481034811
"use strict";
3481134812

3481234813
Object.defineProperty(exports, "__esModule", ({ value: true }));
34813-
exports.parse = exports.CONFIG_PATH = exports.TOKEN = void 0;
34814+
exports.parse = exports.README_PATH = exports.CONFIG_PATH = exports.TOKEN = void 0;
3481434815
const core_1 = __nccwpck_require__(7484);
3481534816
exports.TOKEN = {
3481634817
name: "token",
34817-
env: "INPUT_TOKEN",
3481834818
};
3481934819
exports.CONFIG_PATH = {
3482034820
name: "config",
34821-
env: "INPUT_CONFIG_PATH",
3482234821
defaultValue: ".github/preview-updater.yml",
3482334822
};
34823+
exports.README_PATH = {
34824+
name: "readme",
34825+
defaultValue: "README.md",
34826+
};
3482434827
const parse = () => {
3482534828
const token = (0, core_1.getInput)(exports.TOKEN.name, { required: true });
3482634829
const configPath = (0, core_1.getInput)(exports.CONFIG_PATH.name) || exports.CONFIG_PATH.defaultValue;
34830+
const readmePath = (0, core_1.getInput)(exports.README_PATH.name) || exports.README_PATH.defaultValue;
3482734831
return {
3482834832
token,
3482934833
configPath,
34834+
readmePath,
3483034835
};
3483134836
};
3483234837
exports.parse = parse;
@@ -35058,7 +35063,7 @@ class Repository {
3505835063
}
3505935064
catch (error) {
3506035065
// @ts-expect-error
35061-
error.message = `Error when creating pull request from ${this.branchName()}: ${error.message}`;
35066+
error.message = `Error when creating a pull request from ${this.branchName()}: ${error.message}`;
3506235067
throw error;
3506335068
}
3506435069
}

0 commit comments

Comments
 (0)