Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
chore: build dist release-please-action (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
google-github-actions-bot authored Apr 21, 2022
1 parent 0a3fbe4 commit 75696ba
Showing 1 changed file with 36 additions and 13 deletions.
49 changes: 36 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -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');
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 };
}
Expand Down Expand Up @@ -113437,7 +113460,7 @@ module.exports = {};
/***/ ((module) => {

"use strict";
module.exports = {"i8":"13.13.0"};
module.exports = {"i8":"13.14.0"};

/***/ }),

Expand Down

0 comments on commit 75696ba

Please sign in to comment.