Skip to content

Commit

Permalink
chore: Add console logs for debugging in setupProbotApp function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jagoda11 committed Jul 3, 2024
1 parent dbbc83a commit ee6489b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ const setupProbotApp = (probotApp) => {
'pull_request.closed',
],
async (context) => {
// eslint-disable-next-line no-console
console.log('Context payload:', JSON.stringify(context.payload, null, 2));

// eslint-disable-next-line no-console
console.log('Context:', JSON.stringify(context, null, 2));
// eslint-disable-next-line no-console
console.log('🎯 issues.opened event triggered 🎯');
app.log.info('issues.opened event triggered');
Expand All @@ -36,14 +41,18 @@ const setupProbotApp = (probotApp) => {
<img src="https://raw.githubusercontent.com/Jagoda11/rupert-the-bot/main/github-mark/robot.png" alt="Probot Logo" width="100" />`;
}
// eslint-disable-next-line no-console
console.log('Comment body:', body);

const issueComment = context.issue({ body });

// eslint-disable-next-line no-console
console.log(
'✍️ Creating comment with context.issue:',
JSON.stringify(issueComment),
); // Added logging
);
// eslint-disable-next-line no-console
console.log('Issue Comment:', JSON.stringify(issueComment, null, 2));

app.log.info(
'Creating comment with context.issue: ',
Expand Down

0 comments on commit ee6489b

Please sign in to comment.