Skip to content

Commit

Permalink
More logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rehlma committed Apr 12, 2024
1 parent f1d4f5a commit 0841220
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29026,6 +29026,10 @@ function run() {
}
const isCommentChange = github.context.payload.action === 'edited';
const user = (_c = (_b = github.context.payload.comment) === null || _b === void 0 ? void 0 : _b.user) === null || _c === void 0 ? void 0 : _c.login;
const reviewId = (_d = github.context.payload.comment) === null || _d === void 0 ? void 0 : _d.pull_request_review_id;
console.log('Is comment change:', isCommentChange);
console.log('User:', user);
console.log('Review id:', reviewId);
if (isCommentChange && user === botName) {
console.log('Comment change detected');
const { owner, repo } = github.context.repo;
Expand All @@ -29034,7 +29038,7 @@ function run() {
owner,
repo,
pull_number: prNumber,
review_id: (_d = github.context.payload.comment) === null || _d === void 0 ? void 0 : _d.pull_request_review_id
review_id: reviewId
});
console.log('Found comments:', comments.length);
let todoCount = 0;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ export async function run(): Promise<void> {

const isCommentChange = github.context.payload.action === 'edited'
const user = github.context.payload.comment?.user?.login
const reviewId = github.context.payload.comment?.pull_request_review_id

console.log('Is comment change:', isCommentChange)
console.log('User:', user)
console.log('Review id:', reviewId)

if (isCommentChange && user === botName) {
console.log('Comment change detected')
const { owner, repo } = github.context.repo
Expand All @@ -26,7 +32,7 @@ export async function run(): Promise<void> {
owner,
repo,
pull_number: prNumber,
review_id: github.context.payload.comment?.pull_request_review_id
review_id: reviewId
}
)
console.log('Found comments:', comments.length)
Expand Down

0 comments on commit 0841220

Please sign in to comment.