1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-13 11:21:35 +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

27
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; (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.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.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 = this.snapshotLabels =
(manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.snapshotLabels) || exports.DEFAULT_SNAPSHOT_LABELS; (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.snapshotLabels) || exports.DEFAULT_SNAPSHOT_LABELS;
this.bootstrapSha = manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.bootstrapSha; 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. * 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() { async createPullRequests() {
const candidatePullRequests = await this.buildPullRequests(); const candidatePullRequests = await this.buildPullRequests();
@@ -81294,6 +81295,16 @@ class Manifest {
// collect open and snoozed release pull requests // collect open and snoozed release pull requests
const openPullRequests = await this.findOpenReleasePullRequests(); const openPullRequests = await this.findOpenReleasePullRequests();
const snoozedPullRequests = await this.findSnoozedReleasePullRequests(); const snoozedPullRequests = await this.findSnoozedReleasePullRequests();
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 = []; const promises = [];
for (const pullRequest of candidatePullRequests) { for (const pullRequest of candidatePullRequests) {
promises.push(this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests)); promises.push(this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests));
@@ -81302,6 +81313,7 @@ class Manifest {
// reject any pull numbers that were not created or updated // reject any pull numbers that were not created or updated
return pullNumbers.filter(number => !!number); return pullNumbers.filter(number => !!number);
} }
}
async findOpenReleasePullRequests() { async findOpenReleasePullRequests() {
logger_1.logger.info('Looking for open release pull requests'); logger_1.logger.info('Looking for open release pull requests');
const openPullRequests = []; const openPullRequests = [];
@@ -81450,6 +81462,15 @@ class Manifest {
releasesByPullRequest[release.pullRequest.number] = [release]; releasesByPullRequest[release.pullRequest.number] = [release];
} }
} }
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 = []; const promises = [];
for (const pullNumber in releasesByPullRequest) { for (const pullNumber in releasesByPullRequest) {
promises.push(this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber])); promises.push(this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber]));
@@ -81457,6 +81478,7 @@ class Manifest {
const releases = await Promise.all(promises); const releases = await Promise.all(promises);
return releases.reduce((collection, r) => collection.concat(r), []); return releases.reduce((collection, r) => collection.concat(r), []);
} }
}
async createReleasesForPullRequest(releases, pullRequest) { async createReleasesForPullRequest(releases, pullRequest) {
// create the release // create the release
const promises = []; const promises = [];
@@ -81608,6 +81630,7 @@ async function parseConfig(github, configFile, branch, onlyPath, releaseAs) {
snapshotLabels: configSnapshotLabel === undefined ? undefined : [configSnapshotLabel], snapshotLabels: configSnapshotLabel === undefined ? undefined : [configSnapshotLabel],
releaseSearchDepth: config['release-search-depth'], releaseSearchDepth: config['release-search-depth'],
commitSearchDepth: config['commit-search-depth'], commitSearchDepth: config['commit-search-depth'],
sequentialCalls: config['sequential-calls'],
}; };
return { config: repositoryConfig, options: manifestOptions }; return { config: repositoryConfig, options: manifestOptions };
} }
@@ -113437,7 +113460,7 @@ module.exports = {};
/***/ ((module) => { /***/ ((module) => {
"use strict"; "use strict";
module.exports = {"i8":"13.13.0"}; module.exports = {"i8":"13.14.0"};
/***/ }), /***/ }),