Skip to content

Commit

Permalink
feat: do not hide comments from organization members
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Nov 29, 2023
1 parent eb4bf4b commit 2d5aa95
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,17 @@ async function hideUnhelpfulComments() {
const { comment, action, issue } = context.payload
if (action !== "created" || !comment || !issue) return

const { node_id: subjectId, body, id: comment_id } = comment
const {
node_id: subjectId,
body,
id: comment_id,
author_association,
} = comment

// https://docs.github.com/en/webhooks/webhook-events-and-payloads#issue_comment
// https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
if (author_association === "MEMBER")
return debug("Comment was made by an organization owner, skipping...")

if (!isUnhelpfulComment(body) && !isStillHappeningWithoutLink(body)) return

Expand Down

0 comments on commit 2d5aa95

Please sign in to comment.