1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-05 10:37:47 +02:00

chore: build dist release-please-action (#470)

This commit is contained in:
Google GitHub Actions Bot
2022-04-21 11:38:34 -05:00
committed by GitHub
parent 0a3fbe4563
commit 75696baa78

49
dist/index.js vendored
View File

@@ -80956,6 +80956,7 @@ class Manifest {
(manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.releaseLabels) || exports.DEFAULT_RELEASE_LABELS;
this.labels = (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.labels) || exports.DEFAULT_LABELS;
this.skipLabeling = (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.skipLabeling) || false;
this.sequentialCalls = (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.sequentialCalls) || false;
this.snapshotLabels =
(manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.snapshotLabels) || exports.DEFAULT_SNAPSHOT_LABELS;
this.bootstrapSha = manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.bootstrapSha;
@@ -81277,7 +81278,7 @@ class Manifest {
/**
* Opens/updates all candidate release pull requests for this repository.
*
* @returns {number[]} Pull request numbers of release pull requests
* @returns {PullRequest[]} Pull request numbers of release pull requests
*/
async createPullRequests() {
const candidatePullRequests = await this.buildPullRequests();
@@ -81294,13 +81295,24 @@ class Manifest {
// collect open and snoozed release pull requests
const openPullRequests = await this.findOpenReleasePullRequests();
const snoozedPullRequests = await this.findSnoozedReleasePullRequests();
const promises = [];
for (const pullRequest of candidatePullRequests) {
promises.push(this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests));
if (this.sequentialCalls) {
const pullRequests = [];
for (const pullRequest of candidatePullRequests) {
const resultPullRequest = await this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests);
if (resultPullRequest)
pullRequests.push(resultPullRequest);
}
return pullRequests;
}
else {
const promises = [];
for (const pullRequest of candidatePullRequests) {
promises.push(this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests));
}
const pullNumbers = await Promise.all(promises);
// reject any pull numbers that were not created or updated
return pullNumbers.filter(number => !!number);
}
const pullNumbers = await Promise.all(promises);
// reject any pull numbers that were not created or updated
return pullNumbers.filter(number => !!number);
}
async findOpenReleasePullRequests() {
logger_1.logger.info('Looking for open release pull requests');
@@ -81450,12 +81462,22 @@ class Manifest {
releasesByPullRequest[release.pullRequest.number] = [release];
}
}
const promises = [];
for (const pullNumber in releasesByPullRequest) {
promises.push(this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber]));
if (this.sequentialCalls) {
const resultReleases = [];
for (const pullNumber in releasesByPullRequest) {
const releases = await this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber]);
resultReleases.concat(releases);
}
return resultReleases;
}
else {
const promises = [];
for (const pullNumber in releasesByPullRequest) {
promises.push(this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber]));
}
const releases = await Promise.all(promises);
return releases.reduce((collection, r) => collection.concat(r), []);
}
const releases = await Promise.all(promises);
return releases.reduce((collection, r) => collection.concat(r), []);
}
async createReleasesForPullRequest(releases, pullRequest) {
// create the release
@@ -81608,6 +81630,7 @@ async function parseConfig(github, configFile, branch, onlyPath, releaseAs) {
snapshotLabels: configSnapshotLabel === undefined ? undefined : [configSnapshotLabel],
releaseSearchDepth: config['release-search-depth'],
commitSearchDepth: config['commit-search-depth'],
sequentialCalls: config['sequential-calls'],
};
return { config: repositoryConfig, options: manifestOptions };
}
@@ -113437,7 +113460,7 @@ module.exports = {};
/***/ ((module) => {
"use strict";
module.exports = {"i8":"13.13.0"};
module.exports = {"i8":"13.14.0"};
/***/ }),