Skip to content

Commit

Permalink
dist: build new release
Browse files Browse the repository at this point in the history
  • Loading branch information
korthout committed Dec 16, 2023
1 parent 56bbfb0 commit 598ae04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions dist/index.js
Expand Up @@ -56,7 +56,7 @@ var Output;
(function (Output) {
Output["wasSuccessful"] = "was_successful";
Output["wasSuccessfulByTarget"] = "was_successful_by_target";
Output["successfulPRs"] = "successful_prs";
Output["created_pull_numbers"] = "created_pull_numbers";
})(Output || (Output = {}));
class Backport {
constructor(github, config, git) {
Expand Down Expand Up @@ -163,7 +163,7 @@ class Backport {
}
console.log(`Will copy labels matching ${this.config.copy_labels_pattern}. Found matching labels: ${labelsToCopy}`);
const successByTarget = new Map();
const successPRs = new Array();
const createdPullRequestNumbers = new Array();
for (const target of target_branches) {
console.log(`Backporting to target branch '${target}...'`);
try {
Expand Down Expand Up @@ -297,7 +297,7 @@ class Backport {
}
const message = this.composeMessageForSuccess(new_pr.number, target);
successByTarget.set(target, true);
successPRs.push(new_pr.number);
createdPullRequestNumbers.push(new_pr.number);
yield this.github.createComment({
owner,
repo,
Expand All @@ -321,7 +321,7 @@ class Backport {
}
}
}
this.createOutput(successByTarget, successPRs);
this.createOutput(successByTarget, createdPullRequestNumbers);
}
catch (error) {
if (error instanceof Error) {
Expand Down Expand Up @@ -387,13 +387,13 @@ class Backport {
return (0, dedent_1.default) `Successfully created backport PR for \`${target}\`:
- #${pr_number}`;
}
createOutput(successByTarget, successPRs) {
createOutput(successByTarget, createdPullRequestNumbers) {
const anyTargetFailed = Array.from(successByTarget.values()).includes(false);
core.setOutput(Output.wasSuccessful, !anyTargetFailed);
const byTargetOutput = Array.from(successByTarget.entries()).reduce((i, [target, result]) => `${i}${target}=${result}\n`, "");
core.setOutput(Output.wasSuccessfulByTarget, byTargetOutput);
const successPRsOutput = successPRs.join(" ");
core.setOutput(Output.successfulPRs, successPRsOutput);
const createdPullNumbersOutput = createdPullRequestNumbers.join(" ");
core.setOutput(Output.created_pull_numbers, createdPullNumbersOutput);
}
}
exports.Backport = Backport;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 598ae04

Please sign in to comment.