Skip to content

Commit

Permalink
chore(deps): update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoRamil committed Dec 9, 2024
1 parent c688300 commit 8b3c05a
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 12 deletions.
29 changes: 25 additions & 4 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31572,6 +31572,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports["default"] = run;
__nccwpck_require__(3045);
const errors_1 = __nccwpck_require__(6976);
const status_1 = __nccwpck_require__(5922);
async function run(core, github) {
async function fetchPullRequests(endpoint, limit = 100) {
try {
Expand Down Expand Up @@ -31774,26 +31775,46 @@ async function run(core, github) {
}
if (!result)
return;
core.debug(`Result: ${result.status} ${result.status !== 200
core.debug(`Result: ${result.status} ${!(0, status_1.obtainValidStatus)().includes(result.status)
? `${result.data.message}\n${`${result.url}`.underline.cyan}`
: ''}`);
return { result, pr };
})).then((results) => {
if (!results)
return;
results = results.filter((r) => typeof r !== 'undefined');
const passed = results.filter((r) => r.result.status === 200);
const failed = results.filter((r) => r.result.status !== 200);
const passed = results.filter((r) => (0, status_1.obtainValidStatus)().includes(r.result.status));
const failed = results.filter((r) => !(0, status_1.obtainValidStatus)().includes(r.result.status));
results = results.sort((a, b) => a.pr.number - b.pr.number);
core.info(`\n\n-------------------------\nAttempted to update ${results.length} pull request${results.length === 1 ? '' : 's'}:\n${results
.map((r) => ` ${r.result.status !== 200 ? '❌' : '✅'} ${`#${r.pr.number}`.yellow} ${r.pr.title}\t${`${r.pr.number}`.underline.cyan}`)
.map((r) => ` ${!(0, status_1.obtainValidStatus)().includes(r.result.status) ? '❌' : '✅'} ${`#${r.pr.number}`.yellow} ${r.pr.title}\t${`${r.pr.number}`.underline.cyan}`)
.join('\n')}\n-------------------------\n\n${'Summary'.underline}\n---\n ${`${passed.length}`.green} succeeded.\n ${`${failed.length}`.red} failed.`);
core.setOutput('updated', passed.length);
core.setOutput('failed', failed.length);
});
}


/***/ }),

/***/ 5922:
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.HTTP_OK_STATUS = exports.obtainValidStatus = void 0;
let VALID_STATUS = [];
const obtainValidStatus = () => {
if (VALID_STATUS.length === 0) {
VALID_STATUS = exports.HTTP_OK_STATUS;
}
return VALID_STATUS;
};
exports.obtainValidStatus = obtainValidStatus;
exports.HTTP_OK_STATUS = Array.from({ length: 100 }, (_, i) => i + 200);


/***/ }),

/***/ 9491:
Expand Down
9 changes: 5 additions & 4 deletions dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main.js.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions dist/status.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/status.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 22 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"pull-request",
"update"
],
"exports": {
"exports": {
".": "./bin/index.js"
},
"engines": {
Expand Down

0 comments on commit 8b3c05a

Please sign in to comment.