Skip to content

Commit

Permalink
fix: redactPrivateRepoCommentsadded added
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Oct 1, 2024
1 parent 5f64e28 commit 69bf28d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/handlers/add-comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function addComments(context: Context) {
const markdown = payload.comment.body;
const authorId = payload.comment.user?.id || -1;
const nodeId = payload.comment.node_id;
const isPrivate = context.config.redactPrivateRepoComments ? false : payload.repository.private;
const isPrivate = context.config.redactPrivateRepoComments;
const issueId = payload.issue.node_id;

try {
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/add-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function addIssue(context: Context) {
const markdown = payload.issue.body + " " + payload.issue.title || null;
const authorId = payload.issue.user?.id || -1;
const nodeId = payload.issue.node_id;
const isPrivate = !context.config.redactPrivateRepoComments && payload.repository.private;
const isPrivate = context.config.redactPrivateRepoComments;

try {
if (!markdown) {
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/update-comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function updateComment(context: Context) {
} = context;
const { payload } = context as { payload: CommentPayload };
const nodeId = payload.comment.node_id;
const isPrivate = !context.config.redactPrivateRepoComments && payload.repository.private;
const isPrivate = context.config.redactPrivateRepoComments;
const markdown = payload.comment.body || null;
// Fetch the previous comment and update it in the db
try {
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/update-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function updateIssue(context: Context) {
const { payload } = context as { payload: IssuePayload };
const payloadObject = payload;
const nodeId = payload.issue.node_id;
const isPrivate = !context.config.redactPrivateRepoComments && payload.repository.private;
const isPrivate = context.config.redactPrivateRepoComments;
const markdown = payload.issue.body + " " + payload.issue.title || null;
// Fetch the previous issue and update it in the db
try {
Expand Down

0 comments on commit 69bf28d

Please sign in to comment.