We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb4bf4b commit 2d5aa95Copy full SHA for 2d5aa95
index.js
@@ -248,7 +248,17 @@ async function hideUnhelpfulComments() {
248
const { comment, action, issue } = context.payload
249
if (action !== "created" || !comment || !issue) return
250
251
- const { node_id: subjectId, body, id: comment_id } = comment
+ const {
252
+ node_id: subjectId,
253
+ body,
254
+ id: comment_id,
255
+ author_association,
256
+ } = comment
257
+
258
+ // https://docs.github.com/en/webhooks/webhook-events-and-payloads#issue_comment
259
+ // https://docs.github.com/en/graphql/reference/enums#commentauthorassociation
260
+ if (author_association === "MEMBER")
261
+ return debug("Comment was made by an organization owner, skipping...")
262
263
if (!isUnhelpfulComment(body) && !isStillHappeningWithoutLink(body)) return
264
0 commit comments