mirror of
https://github.com/joaquinjsb/gitea-release-please-action
synced 2026-05-14 01:01:33 +02:00
committed by
GitHub
parent
bab175efb5
commit
6a05e01ec0
66
dist/index.js
vendored
66
dist/index.js
vendored
@@ -80208,7 +80208,7 @@ exports.getReleaserTypes = getReleaserTypes;
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.GitHub = exports.GH_GRAPHQL_URL = exports.GH_API_URL = void 0;
|
exports.sleepInMs = exports.GitHub = exports.GH_GRAPHQL_URL = exports.GH_API_URL = void 0;
|
||||||
const code_suggester_1 = __nccwpck_require__(77103);
|
const code_suggester_1 = __nccwpck_require__(77103);
|
||||||
const rest_1 = __nccwpck_require__(55375);
|
const rest_1 = __nccwpck_require__(55375);
|
||||||
const request_1 = __nccwpck_require__(36234);
|
const request_1 = __nccwpck_require__(36234);
|
||||||
@@ -80216,6 +80216,7 @@ const graphql_1 = __nccwpck_require__(88467);
|
|||||||
const request_error_1 = __nccwpck_require__(10537);
|
const request_error_1 = __nccwpck_require__(10537);
|
||||||
const errors_1 = __nccwpck_require__(93637);
|
const errors_1 = __nccwpck_require__(93637);
|
||||||
const MAX_ISSUE_BODY_SIZE = 65536;
|
const MAX_ISSUE_BODY_SIZE = 65536;
|
||||||
|
const MAX_SLEEP_SECONDS = 20;
|
||||||
exports.GH_API_URL = 'https://api.github.com';
|
exports.GH_API_URL = 'https://api.github.com';
|
||||||
exports.GH_GRAPHQL_URL = 'https://api.github.com';
|
exports.GH_GRAPHQL_URL = 'https://api.github.com';
|
||||||
const logger_1 = __nccwpck_require__(68809);
|
const logger_1 = __nccwpck_require__(68809);
|
||||||
@@ -80253,7 +80254,9 @@ class GitHub {
|
|||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
});
|
});
|
||||||
this.graphqlRequest = wrapAsync(async (opts, maxRetries = 1) => {
|
this.graphqlRequest = wrapAsync(async (opts, options) => {
|
||||||
|
var _a;
|
||||||
|
let maxRetries = (_a = options === null || options === void 0 ? void 0 : options.maxRetries) !== null && _a !== void 0 ? _a : 5;
|
||||||
let seconds = 1;
|
let seconds = 1;
|
||||||
while (maxRetries >= 0) {
|
while (maxRetries >= 0) {
|
||||||
try {
|
try {
|
||||||
@@ -80267,13 +80270,17 @@ class GitHub {
|
|||||||
if (err.status !== 502) {
|
if (err.status !== 502) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
logger_1.logger.trace('received 502 error, retrying');
|
if (maxRetries === 0) {
|
||||||
|
logger_1.logger.warn('ran out of retries and response is required');
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
logger_1.logger.info(`received 502 error, ${maxRetries} attempts remaining`);
|
||||||
}
|
}
|
||||||
maxRetries -= 1;
|
maxRetries -= 1;
|
||||||
if (maxRetries >= 0) {
|
if (maxRetries >= 0) {
|
||||||
logger_1.logger.trace(`sleeping ${seconds} seconds`);
|
logger_1.logger.trace(`sleeping ${seconds} seconds`);
|
||||||
await sleepInMs(1000 * seconds);
|
await (0, exports.sleepInMs)(1000 * seconds);
|
||||||
seconds *= 2;
|
seconds = Math.min(seconds * 2, MAX_SLEEP_SECONDS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger_1.logger.trace('ran out of retries');
|
logger_1.logger.trace('ran out of retries');
|
||||||
@@ -80882,7 +80889,7 @@ class GitHub {
|
|||||||
targetBranch,
|
targetBranch,
|
||||||
states,
|
states,
|
||||||
maxFilesChanged: 64,
|
maxFilesChanged: 64,
|
||||||
}, 3);
|
});
|
||||||
if (!((_a = response === null || response === void 0 ? void 0 : response.repository) === null || _a === void 0 ? void 0 : _a.pullRequests)) {
|
if (!((_a = response === null || response === void 0 ? void 0 : response.repository) === null || _a === void 0 ? void 0 : _a.pullRequests)) {
|
||||||
logger_1.logger.warn(`Could not find merged pull requests for branch ${targetBranch} - it likely does not exist.`);
|
logger_1.logger.warn(`Could not find merged pull requests for branch ${targetBranch} - it likely does not exist.`);
|
||||||
return null;
|
return null;
|
||||||
@@ -81199,6 +81206,7 @@ const wrapAsync = (fn, errorHandler) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
const sleepInMs = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
const sleepInMs = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
||||||
|
exports.sleepInMs = sleepInMs;
|
||||||
//# sourceMappingURL=github.js.map
|
//# sourceMappingURL=github.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -81922,6 +81930,7 @@ function extractReleaserConfig(config) {
|
|||||||
releaseType: config['release-type'],
|
releaseType: config['release-type'],
|
||||||
bumpMinorPreMajor: config['bump-minor-pre-major'],
|
bumpMinorPreMajor: config['bump-minor-pre-major'],
|
||||||
bumpPatchForMinorPreMajor: config['bump-patch-for-minor-pre-major'],
|
bumpPatchForMinorPreMajor: config['bump-patch-for-minor-pre-major'],
|
||||||
|
versioning: config['versioning'],
|
||||||
changelogSections: config['changelog-sections'],
|
changelogSections: config['changelog-sections'],
|
||||||
changelogPath: config['changelog-path'],
|
changelogPath: config['changelog-path'],
|
||||||
changelogHost: config['changelog-host'],
|
changelogHost: config['changelog-host'],
|
||||||
@@ -82076,7 +82085,9 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
|
|||||||
// only look at the last 250 or so commits to find the latest tag - we
|
// only look at the last 250 or so commits to find the latest tag - we
|
||||||
// don't want to scan the entire repository history if this repo has never
|
// don't want to scan the entire repository history if this repo has never
|
||||||
// been released
|
// been released
|
||||||
const generator = github.mergeCommitIterator(targetBranch, { maxResults: 250 });
|
const generator = github.mergeCommitIterator(targetBranch, {
|
||||||
|
maxResults: 250,
|
||||||
|
});
|
||||||
for await (const commitWithPullRequest of generator) {
|
for await (const commitWithPullRequest of generator) {
|
||||||
commitShas.add(commitWithPullRequest.sha);
|
commitShas.add(commitWithPullRequest.sha);
|
||||||
const mergedPullRequest = commitWithPullRequest.pullRequest;
|
const mergedPullRequest = commitWithPullRequest.pullRequest;
|
||||||
@@ -82147,29 +82158,30 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
|
|||||||
return candidateTagVersion.sort((a, b) => b.compare(a))[0];
|
return candidateTagVersion.sort((a, b) => b.compare(a))[0];
|
||||||
}
|
}
|
||||||
function mergeReleaserConfig(defaultConfig, pathConfig) {
|
function mergeReleaserConfig(defaultConfig, pathConfig) {
|
||||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
||||||
return {
|
return {
|
||||||
releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
|
releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
|
||||||
bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
|
bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
|
||||||
bumpPatchForMinorPreMajor: (_d = pathConfig.bumpPatchForMinorPreMajor) !== null && _d !== void 0 ? _d : defaultConfig.bumpPatchForMinorPreMajor,
|
bumpPatchForMinorPreMajor: (_d = pathConfig.bumpPatchForMinorPreMajor) !== null && _d !== void 0 ? _d : defaultConfig.bumpPatchForMinorPreMajor,
|
||||||
changelogSections: (_e = pathConfig.changelogSections) !== null && _e !== void 0 ? _e : defaultConfig.changelogSections,
|
versioning: (_e = pathConfig.versioning) !== null && _e !== void 0 ? _e : defaultConfig.versioning,
|
||||||
changelogPath: (_f = pathConfig.changelogPath) !== null && _f !== void 0 ? _f : defaultConfig.changelogPath,
|
changelogSections: (_f = pathConfig.changelogSections) !== null && _f !== void 0 ? _f : defaultConfig.changelogSections,
|
||||||
changelogHost: (_g = pathConfig.changelogHost) !== null && _g !== void 0 ? _g : defaultConfig.changelogHost,
|
changelogPath: (_g = pathConfig.changelogPath) !== null && _g !== void 0 ? _g : defaultConfig.changelogPath,
|
||||||
changelogType: (_h = pathConfig.changelogType) !== null && _h !== void 0 ? _h : defaultConfig.changelogType,
|
changelogHost: (_h = pathConfig.changelogHost) !== null && _h !== void 0 ? _h : defaultConfig.changelogHost,
|
||||||
releaseAs: (_j = pathConfig.releaseAs) !== null && _j !== void 0 ? _j : defaultConfig.releaseAs,
|
changelogType: (_j = pathConfig.changelogType) !== null && _j !== void 0 ? _j : defaultConfig.changelogType,
|
||||||
skipGithubRelease: (_k = pathConfig.skipGithubRelease) !== null && _k !== void 0 ? _k : defaultConfig.skipGithubRelease,
|
releaseAs: (_k = pathConfig.releaseAs) !== null && _k !== void 0 ? _k : defaultConfig.releaseAs,
|
||||||
draft: (_l = pathConfig.draft) !== null && _l !== void 0 ? _l : defaultConfig.draft,
|
skipGithubRelease: (_l = pathConfig.skipGithubRelease) !== null && _l !== void 0 ? _l : defaultConfig.skipGithubRelease,
|
||||||
prerelease: (_m = pathConfig.prerelease) !== null && _m !== void 0 ? _m : defaultConfig.prerelease,
|
draft: (_m = pathConfig.draft) !== null && _m !== void 0 ? _m : defaultConfig.draft,
|
||||||
component: (_o = pathConfig.component) !== null && _o !== void 0 ? _o : defaultConfig.component,
|
prerelease: (_o = pathConfig.prerelease) !== null && _o !== void 0 ? _o : defaultConfig.prerelease,
|
||||||
packageName: (_p = pathConfig.packageName) !== null && _p !== void 0 ? _p : defaultConfig.packageName,
|
component: (_p = pathConfig.component) !== null && _p !== void 0 ? _p : defaultConfig.component,
|
||||||
versionFile: (_q = pathConfig.versionFile) !== null && _q !== void 0 ? _q : defaultConfig.versionFile,
|
packageName: (_q = pathConfig.packageName) !== null && _q !== void 0 ? _q : defaultConfig.packageName,
|
||||||
extraFiles: (_r = pathConfig.extraFiles) !== null && _r !== void 0 ? _r : defaultConfig.extraFiles,
|
versionFile: (_r = pathConfig.versionFile) !== null && _r !== void 0 ? _r : defaultConfig.versionFile,
|
||||||
includeComponentInTag: (_s = pathConfig.includeComponentInTag) !== null && _s !== void 0 ? _s : defaultConfig.includeComponentInTag,
|
extraFiles: (_s = pathConfig.extraFiles) !== null && _s !== void 0 ? _s : defaultConfig.extraFiles,
|
||||||
includeVInTag: (_t = pathConfig.includeVInTag) !== null && _t !== void 0 ? _t : defaultConfig.includeVInTag,
|
includeComponentInTag: (_t = pathConfig.includeComponentInTag) !== null && _t !== void 0 ? _t : defaultConfig.includeComponentInTag,
|
||||||
tagSeparator: (_u = pathConfig.tagSeparator) !== null && _u !== void 0 ? _u : defaultConfig.tagSeparator,
|
includeVInTag: (_u = pathConfig.includeVInTag) !== null && _u !== void 0 ? _u : defaultConfig.includeVInTag,
|
||||||
pullRequestTitlePattern: (_v = pathConfig.pullRequestTitlePattern) !== null && _v !== void 0 ? _v : defaultConfig.pullRequestTitlePattern,
|
tagSeparator: (_v = pathConfig.tagSeparator) !== null && _v !== void 0 ? _v : defaultConfig.tagSeparator,
|
||||||
separatePullRequests: (_w = pathConfig.separatePullRequests) !== null && _w !== void 0 ? _w : defaultConfig.separatePullRequests,
|
pullRequestTitlePattern: (_w = pathConfig.pullRequestTitlePattern) !== null && _w !== void 0 ? _w : defaultConfig.pullRequestTitlePattern,
|
||||||
skipSnapshot: (_x = pathConfig.skipSnapshot) !== null && _x !== void 0 ? _x : defaultConfig.skipSnapshot,
|
separatePullRequests: (_x = pathConfig.separatePullRequests) !== null && _x !== void 0 ? _x : defaultConfig.separatePullRequests,
|
||||||
|
skipSnapshot: (_y = pathConfig.skipSnapshot) !== null && _y !== void 0 ? _y : defaultConfig.skipSnapshot,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -114386,7 +114398,7 @@ module.exports = {};
|
|||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
module.exports = {"i8":"13.20.0"};
|
module.exports = {"i8":"13.21.0"};
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user