Skip to content

Commit

Permalink
fix: removed 'powered by..' pr body suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
lampajr committed Jun 28, 2023
1 parent 0fbe0f6 commit 6869bec
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
4 changes: 1 addition & 3 deletions dist/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class PullRequestConfigsParser extends configs_parser_1.default {
}
}
const bodyPrefix = args.bodyPrefix ?? `**Backport:** ${originalPullRequest.htmlUrl}\r\n\r\n`;
const body = args.body ?? `${originalPullRequest.body}\r\n\r\nPowered by [BPer](https://github.com/lampajr/backporting).`;
const body = args.body ?? `${originalPullRequest.body}`;
return {
author: args.gitUser,
title: args.title ?? `[${args.targetBranch}] ${originalPullRequest.title}`,
Expand All @@ -181,8 +181,6 @@ class PullRequestConfigsParser extends configs_parser_1.default {
targetRepo: originalPullRequest.targetRepo,
sourceRepo: originalPullRequest.targetRepo,
branchName: args.bpBranchName,
// nCommits: 0, // not needed, but required by the
// commits: [] // not needed
};
}
}
Expand Down
4 changes: 1 addition & 3 deletions dist/gha/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class PullRequestConfigsParser extends configs_parser_1.default {
}
}
const bodyPrefix = args.bodyPrefix ?? `**Backport:** ${originalPullRequest.htmlUrl}\r\n\r\n`;
const body = args.body ?? `${originalPullRequest.body}\r\n\r\nPowered by [BPer](https://github.com/lampajr/backporting).`;
const body = args.body ?? `${originalPullRequest.body}`;
return {
author: args.gitUser,
title: args.title ?? `[${args.targetBranch}] ${originalPullRequest.title}`,
Expand All @@ -175,8 +175,6 @@ class PullRequestConfigsParser extends configs_parser_1.default {
targetRepo: originalPullRequest.targetRepo,
sourceRepo: originalPullRequest.targetRepo,
branchName: args.bpBranchName,
// nCommits: 0, // not needed, but required by the
// commits: [] // not needed
};
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/service/configs/pullrequest/pr-configs-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class PullRequestConfigsParser extends ConfigsParser {
}

const bodyPrefix = args.bodyPrefix ?? `**Backport:** ${originalPullRequest.htmlUrl}\r\n\r\n`;
const body = args.body ?? `${originalPullRequest.body}\r\n\r\nPowered by [BPer](https://github.com/lampajr/backporting).`;
const body = args.body ?? `${originalPullRequest.body}`;

return {
author: args.gitUser,
Expand All @@ -65,8 +65,6 @@ export default class PullRequestConfigsParser extends ConfigsParser {
targetRepo: originalPullRequest.targetRepo,
sourceRepo: originalPullRequest.targetRepo,
branchName: args.bpBranchName,
// nCommits: 0, // not needed, but required by the
// commits: [] // not needed
};
}
}
2 changes: 1 addition & 1 deletion test/service/configs/pullrequest/pr-configs-parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe("pull request config parser", () => {
url: undefined,
htmlUrl: undefined,
title: "[prod] PR Title",
body: "**Backport:** https://github.com/owner/reponame/pull/2368\r\n\r\nPlease review and merge\r\n\r\nPowered by [BPer](https://github.com/lampajr/backporting).",
body: "**Backport:** https://github.com/owner/reponame/pull/2368\r\n\r\nPlease review and merge",
reviewers: ["gh-user", "that-s-a-user"],
assignees: [],
targetRepo: {
Expand Down

0 comments on commit 6869bec

Please sign in to comment.