Skip to content

Commit

Permalink
use comment.id
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Oct 2, 2023
1 parent fa50783 commit c0ccd08
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Nissuer
uses: balazsorban44/nissuer@1.7.1
uses: balazsorban44/nissuer@1.7.2
with:
label-area-section: 'Which area\(s\) are affected\?(.*)'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Nissuer
uses: balazsorban44/nissuer@1.7.1
uses: balazsorban44/nissuer@1.7.2
```

Add a comment file (by default we look for `.github/invalid-reproduction.md`):
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ async function hideUnhelpfulComments() {
const { comment, action, issue } = context.payload
if (action !== "created" || !comment || !issue) return

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

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

Expand All @@ -250,13 +250,13 @@ async function hideUnhelpfulComments() {
const { graphql, rest: client } = getOctokit(config.token)

if (config.comments.addExplainer) {
debug(`Adding explainer to comment #${subjectId}...`)
debug(`Adding explainer to comment ${comment_id}...`)
await client.issues.updateComment({
...context.repo,
comment_id: subjectId,
comment_id,
body: `${body}\n\n${updatedComment}`,
})
info(`Explainer added to comment #${subjectId}`)
info(`Explainer added to comment ${comment_id}`)
}

/** @see https://docs.github.com/en/graphql/reference/mutations#minimizecomment */
Expand Down

0 comments on commit c0ccd08

Please sign in to comment.