Skip to content

Commit

Permalink
body
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschmidt93 authored Jul 10, 2024
1 parent fddef14 commit 5994b47
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions dist/431.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/431.index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/676.index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/676.index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/helpers/approvals-satisfied.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class ApprovalsSatisfied extends HelperInputs {
number_of_reviewers?: string;
required_review_overrides?: string;
pull_number?: string;
approvals_not_met_message?: string;
body?: string;
}

export const approvalsSatisfied = async ({
Expand All @@ -38,7 +38,7 @@ export const approvalsSatisfied = async ({
number_of_reviewers = '1',
required_review_overrides,
pull_number,
approvals_not_met_message
body
}: ApprovalsSatisfied = {}) => {
const prNumber = pull_number ? Number(pull_number) : context.issue.number;

Expand Down Expand Up @@ -99,8 +99,8 @@ export const approvalsSatisfied = async ({
if (!approvalsSatisfied) {
logs.unshift('Required approvals not satisfied:\n');

if (approvals_not_met_message) {
logs.unshift(approvals_not_met_message + '\n');
if (body) {
logs.unshift(body + '\n');
}

await createPrComment({
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/manage-merge-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const manageMergeQueue = async ({ max_queue_size, login, slack_webhook_ur
return removePrFromQueue(pullRequest);
}
const prMeetsRequiredApprovals = await approvalsSatisfied({
approvals_not_met_message: 'PRs must meet all required approvals before entering the merge queue.'
body: 'PRs must meet all required approvals before entering the merge queue.'
});
if (!prMeetsRequiredApprovals) {
return removePrFromQueue(pullRequest);
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/approvals-satisfied.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ Number of required reviews: 1`
await approvalsSatisfied({
users: '@user1,@user2',
pull_number: '12345',
approvals_not_met_message: 'PRs must meet all required approvals before entering the merge queue.'
body: 'PRs must meet all required approvals before entering the merge queue.'
});
expect(octokit.issues.createComment).toHaveBeenCalledWith(
expect.objectContaining({
Expand Down

0 comments on commit 5994b47

Please sign in to comment.