Skip to content

Commit

Permalink
refactor: update var name
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain committed Feb 28, 2024
1 parent d7f56d2 commit 96d3b2d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/github/templates/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ function renderComment(
const location = NameBlock[name];
const action = payload.action;

let notRenderBody = false;
let doNotRenderBody = false;
if (['edited'].includes(action)) {
notRenderBody = true;
doNotRenderBody = true;
}

const text = textTpl(
Expand All @@ -90,7 +90,7 @@ function renderComment(
target: renderPrOrIssueTitleLink(data),
title: `{{sender | link:sender}} ${action} [comment](${comment.html_url}) on [${location}](${data.html_url})`,
body: renderCommentBody(payload.comment),
notRenderBody,
doNotRenderBody,
},
ctx,
);
Expand Down
2 changes: 1 addition & 1 deletion src/github/templates/prOrIssue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function render(
target: builder.build(),
body: renderPrOrIssueBody(data),
contentLimit,
notRenderBody: !shouldRenderBody,
doNotRenderBody: !shouldRenderBody,
},
ctx,
);
Expand Down
2 changes: 1 addition & 1 deletion src/github/templates/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function handleReview(
action: titleActionText,
title: textFirstLine,
body: '{{review.body}}',
notRenderBody: doNotRenderBody,
doNotRenderBody: doNotRenderBody,
},
ctx,
);
Expand Down
4 changes: 2 additions & 2 deletions src/github/templates/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export type TextTplInput = {
action: string;
contentLimit?: number;
notCapitalizeTitle?: boolean;
notRenderBody?: boolean;
doNotRenderBody?: boolean;
autoRef?: boolean;
};

Expand Down Expand Up @@ -282,7 +282,7 @@ export const textTpl: TextTpl = (data, ctx, options) => {
}

let bodyText = '';
if (!data.notRenderBody) {
if (!data.doNotRenderBody) {
bodyText = render(body.trim(), payload);
}

Expand Down

0 comments on commit 96d3b2d

Please sign in to comment.