Skip to content

Commit

Permalink
show user object
Browse files Browse the repository at this point in the history
  • Loading branch information
tnyo43 committed Mar 3, 2024
1 parent bc38ca0 commit 24d9b9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function run(): Promise<void> {
repo,
issue_number: prNumber
})
).data.filter(comment => comment.user?.id === context.runId)
).data

const reviewComments = (
await octokit.rest.pulls.listReviewComments({
Expand All @@ -42,11 +42,9 @@ export async function run(): Promise<void> {
owner,
repo,
issue_number: prNumber,
body: `the number of the comments is ${comments.length}\ncontents: \n${comments.map(c => `- ${c.user?.name}, ${c.body}`).join('\n')}
the number of the comments is ${comments.length}\ncontents: \n${comments.map(c => `- ${c.user?.id}, ${c.body}`).join('\n')}
the number of the review comments is ${reviewComments.length}\ncontents: \n${reviewComments.map(c => `- ${c.user?.id}, ${c.body}`).join('\n')}`
body: `the number of the comments is ${comments.length}\ncontents: \n${comments.map(c => `- ${JSON.stringify(c.user)}, ${c.body}`).join('\n')}
the number of the review comments is ${reviewComments.length}\ncontents: \n${reviewComments.map(c => `- ${JSON.stringify(c.user)}, ${c.body}`).join('\n')}`
})
core.debug(`Commented on PR #${prNumber}`)
} catch (error) {
Expand Down

0 comments on commit 24d9b9e

Please sign in to comment.