Skip to content

Commit 9ee4508

Browse files
fix: apply code build script
1 parent 19f1f70 commit 9ee4508

1 file changed

Lines changed: 129 additions & 74 deletions

File tree

dist/index.js

Lines changed: 129 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -58507,47 +58507,6 @@ function wrappy (fn, cb) {
5850758507
}
5850858508

5850958509

58510-
/***/ }),
58511-
58512-
/***/ 6308:
58513-
/***/ ((module) => {
58514-
58515-
const ENUM_SPLIT_REGEX = /\n/;
58516-
58517-
module.exports = {
58518-
parseEnum(input) {
58519-
return input
58520-
.split(ENUM_SPLIT_REGEX)
58521-
.map((part) => part.trim())
58522-
.filter((part) => part.length > 0);
58523-
},
58524-
58525-
parseBoolean(input) {
58526-
return JSON.parse(input.trim());
58527-
},
58528-
58529-
parseString(input) {
58530-
return input;
58531-
}
58532-
};
58533-
58534-
58535-
/***/ }),
58536-
58537-
/***/ 8636:
58538-
/***/ ((module) => {
58539-
58540-
module.exports = function formatMessage(message, values) {
58541-
let formatted = message;
58542-
if (values) {
58543-
Object.entries(values).forEach(([key, value]) => {
58544-
formatted = formatted.replace(new RegExp(`{${key}}`, 'g'), value);
58545-
});
58546-
}
58547-
return formatted;
58548-
};
58549-
58550-
5855158510
/***/ }),
5855258511

5855358512
/***/ 4351:
@@ -58556,8 +58515,8 @@ module.exports = function formatMessage(message, values) {
5855658515
const core = __nccwpck_require__(2186);
5855758516
const github = __nccwpck_require__(5438);
5855858517
const axios = __nccwpck_require__(8757);
58559-
const parseConfig = __nccwpck_require__(5194);
58560-
const validatePrTitle = __nccwpck_require__(3661);
58518+
const parseConfig = __nccwpck_require__(9000);
58519+
const validatePrTitle = __nccwpck_require__(4484);
5856158520

5856258521
module.exports = async function run() {
5856358522
try {
@@ -58675,7 +58634,7 @@ module.exports = async function run() {
5867558634
});
5867658635
} catch (error) {
5867758636
throw new Error(
58678-
`Pull request has only one commit and it's not semantic; this may lead to a non-semantic commit in the base branch (see https://github.com/community/community/discussions/16271). Amend the commit message to match the pull request title, or add another commit.`
58637+
`Pull request has only one commit and it's not semantic; this may lead to a non-semantic commit in the base branch (see https://github.com/community/community/discussions/16271 ). Amend the commit message to match the pull request title, or add another commit.`
5867958638
);
5868058639
}
5868158640

@@ -58747,12 +58706,42 @@ async function validateSubscription() {
5874758706

5874858707
/***/ }),
5874958708

58750-
/***/ 5194:
58751-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
58709+
/***/ 9000:
58710+
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
58711+
58712+
"use strict";
58713+
// ESM COMPAT FLAG
58714+
__nccwpck_require__.r(__webpack_exports__);
58715+
58716+
// EXPORTS
58717+
__nccwpck_require__.d(__webpack_exports__, {
58718+
"default": () => (/* binding */ parseConfig)
58719+
});
58720+
58721+
;// CONCATENATED MODULE: ./src/ConfigParser.js
58722+
const ENUM_SPLIT_REGEX = /\n/;
58723+
58724+
/* harmony default export */ const ConfigParser = ({
58725+
parseEnum(input) {
58726+
return input
58727+
.split(ENUM_SPLIT_REGEX)
58728+
.map((part) => part.trim())
58729+
.filter((part) => part.length > 0);
58730+
},
58731+
58732+
parseBoolean(input) {
58733+
return JSON.parse(input.trim());
58734+
},
58735+
58736+
parseString(input) {
58737+
return input;
58738+
}
58739+
});
5875258740

58753-
const ConfigParser = __nccwpck_require__(6308);
58741+
;// CONCATENATED MODULE: ./src/parseConfig.js
5875458742

58755-
module.exports = function parseConfig() {
58743+
58744+
function parseConfig() {
5875658745
let types;
5875758746
if (process.env.INPUT_TYPES) {
5875858747
types = ConfigParser.parseEnum(process.env.INPUT_TYPES);
@@ -58841,23 +58830,56 @@ module.exports = function parseConfig() {
5884158830
githubBaseUrl,
5884258831
ignoreLabels
5884358832
};
58844-
};
58833+
}
5884558834

5884658835

5884758836
/***/ }),
5884858837

58849-
/***/ 3661:
58850-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
58838+
/***/ 4484:
58839+
/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => {
58840+
58841+
"use strict";
58842+
// ESM COMPAT FLAG
58843+
__nccwpck_require__.r(__webpack_exports__);
58844+
58845+
// EXPORTS
58846+
__nccwpck_require__.d(__webpack_exports__, {
58847+
"default": () => (/* binding */ validatePrTitle)
58848+
});
58849+
58850+
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
58851+
var core = __nccwpck_require__(2186);
58852+
var core_default = /*#__PURE__*/__nccwpck_require__.n(core);
58853+
// EXTERNAL MODULE: ./node_modules/conventional-changelog-conventionalcommits/index.js
58854+
var conventional_changelog_conventionalcommits = __nccwpck_require__(8761);
58855+
var conventional_changelog_conventionalcommits_default = /*#__PURE__*/__nccwpck_require__.n(conventional_changelog_conventionalcommits);
58856+
;// CONCATENATED MODULE: ./node_modules/conventional-commit-types/index.json
58857+
const conventional_commit_types_namespaceObject = JSON.parse('{"V":{"feat":{"description":"A new feature","title":"Features"},"fix":{"description":"A bug fix","title":"Bug Fixes"},"docs":{"description":"Documentation only changes","title":"Documentation"},"style":{"description":"Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)","title":"Styles"},"refactor":{"description":"A code change that neither fixes a bug nor adds a feature","title":"Code Refactoring"},"perf":{"description":"A code change that improves performance","title":"Performance Improvements"},"test":{"description":"Adding missing tests or correcting existing tests","title":"Tests"},"build":{"description":"Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)","title":"Builds"},"ci":{"description":"Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)","title":"Continuous Integrations"},"chore":{"description":"Other changes that don\'t modify src or test files","title":"Chores"},"revert":{"description":"Reverts a previous commit","title":"Reverts"}}}');
58858+
// EXTERNAL MODULE: ./node_modules/conventional-commits-parser/index.js
58859+
var conventional_commits_parser = __nccwpck_require__(1655);
58860+
;// CONCATENATED MODULE: ./src/formatMessage.js
58861+
function formatMessage(message, values) {
58862+
let formatted = message;
58863+
if (values) {
58864+
Object.entries(values).forEach(([key, value]) => {
58865+
formatted = formatted.replace(new RegExp(`{${key}}`, 'g'), value);
58866+
});
58867+
}
58868+
return formatted;
58869+
}
58870+
58871+
;// CONCATENATED MODULE: ./src/validatePrTitle.js
58872+
58873+
// eslint-disable-next-line import/no-unresolved -- False positive
5885158874

58852-
const core = __nccwpck_require__(2186);
58853-
const conventionalCommitsConfig = __nccwpck_require__(8761);
58854-
const conventionalCommitTypes = __nccwpck_require__(9682);
58855-
const parser = (__nccwpck_require__(1655).sync);
58856-
const formatMessage = __nccwpck_require__(8636);
5885758875

58858-
const defaultTypes = Object.keys(conventionalCommitTypes.types);
58876+
// eslint-disable-next-line import/no-unresolved -- False positive
5885958877

58860-
module.exports = async function validatePrTitle(
58878+
58879+
58880+
const defaultTypes = Object.keys(conventional_commit_types_namespaceObject.V);
58881+
58882+
async function validatePrTitle(
5886158883
prTitle,
5886258884
{
5886358885
types,
@@ -58872,25 +58894,26 @@ module.exports = async function validatePrTitle(
5887258894
) {
5887358895
if (!types) types = defaultTypes;
5887458896

58875-
const {parserOpts} = await conventionalCommitsConfig();
58897+
const {parser: parserOpts} = await conventional_changelog_conventionalcommits_default()();
5887658898
if (headerPattern) {
5887758899
parserOpts.headerPattern = headerPattern;
5887858900
}
5887958901
if (headerPatternCorrespondence) {
5888058902
parserOpts.headerCorrespondence = headerPatternCorrespondence;
5888158903
}
58882-
const result = parser(prTitle, parserOpts);
58883-
core.setOutput('type', result.type);
58884-
core.setOutput('scope', result.scope);
58885-
core.setOutput('subject', result.subject);
58904+
const result = new conventional_commits_parser.CommitParser(parserOpts).parse(prTitle);
58905+
58906+
core_default().setOutput('type', result.type);
58907+
core_default().setOutput('scope', result.scope);
58908+
core_default().setOutput('subject', result.subject);
5888658909

5888758910
function printAvailableTypes() {
5888858911
return `Available types:\n${types
5888958912
.map((type) => {
5889058913
let bullet = ` - ${type}`;
5889158914

5889258915
if (types === defaultTypes) {
58893-
bullet += `: ${conventionalCommitTypes.types[type].description}`;
58916+
bullet += `: ${conventional_commit_types_namespaceObject.V[type].description}`;
5889458917
}
5889558918

5889658919
return bullet;
@@ -58991,11 +59014,11 @@ module.exports = async function validatePrTitle(
5899159014
}
5899259015

5899359016
function raiseError(message) {
58994-
core.setOutput('error_message', message);
59017+
core_default().setOutput('error_message', message);
5899559018

5899659019
throw new Error(message);
5899759020
}
58998-
};
59021+
}
5899959022

5900059023

5900159024
/***/ }),
@@ -65630,14 +65653,6 @@ module.exports = axios;
6563065653
//# sourceMappingURL=axios.cjs.map
6563165654

6563265655

65633-
/***/ }),
65634-
65635-
/***/ 9682:
65636-
/***/ ((module) => {
65637-
65638-
"use strict";
65639-
module.exports = JSON.parse('{"types":{"feat":{"description":"A new feature","title":"Features"},"fix":{"description":"A bug fix","title":"Bug Fixes"},"docs":{"description":"Documentation only changes","title":"Documentation"},"style":{"description":"Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)","title":"Styles"},"refactor":{"description":"A code change that neither fixes a bug nor adds a feature","title":"Code Refactoring"},"perf":{"description":"A code change that improves performance","title":"Performance Improvements"},"test":{"description":"Adding missing tests or correcting existing tests","title":"Tests"},"build":{"description":"Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)","title":"Builds"},"ci":{"description":"Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)","title":"Continuous Integrations"},"chore":{"description":"Other changes that don\'t modify src or test files","title":"Chores"},"revert":{"description":"Reverts a previous commit","title":"Reverts"}}}');
65640-
6564165656
/***/ }),
6564265657

6564365658
/***/ 3765:
@@ -65684,6 +65699,46 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
6568465699
/******/ }
6568565700
/******/
6568665701
/************************************************************************/
65702+
/******/ /* webpack/runtime/compat get default export */
65703+
/******/ (() => {
65704+
/******/ // getDefaultExport function for compatibility with non-harmony modules
65705+
/******/ __nccwpck_require__.n = (module) => {
65706+
/******/ var getter = module && module.__esModule ?
65707+
/******/ () => (module['default']) :
65708+
/******/ () => (module);
65709+
/******/ __nccwpck_require__.d(getter, { a: getter });
65710+
/******/ return getter;
65711+
/******/ };
65712+
/******/ })();
65713+
/******/
65714+
/******/ /* webpack/runtime/define property getters */
65715+
/******/ (() => {
65716+
/******/ // define getter functions for harmony exports
65717+
/******/ __nccwpck_require__.d = (exports, definition) => {
65718+
/******/ for(var key in definition) {
65719+
/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) {
65720+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
65721+
/******/ }
65722+
/******/ }
65723+
/******/ };
65724+
/******/ })();
65725+
/******/
65726+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
65727+
/******/ (() => {
65728+
/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
65729+
/******/ })();
65730+
/******/
65731+
/******/ /* webpack/runtime/make namespace object */
65732+
/******/ (() => {
65733+
/******/ // define __esModule on exports
65734+
/******/ __nccwpck_require__.r = (exports) => {
65735+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
65736+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
65737+
/******/ }
65738+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
65739+
/******/ };
65740+
/******/ })();
65741+
/******/
6568765742
/******/ /* webpack/runtime/node module decorator */
6568865743
/******/ (() => {
6568965744
/******/ __nccwpck_require__.nmd = (module) => {

0 commit comments

Comments
 (0)