Skip to content

Commit 20355b3

Browse files
author
Tulga Tsogtgerel
committed
refactor: rename comment-reaction to pr-assistant
- Rename directory from comment-reaction to pr-assistant - Update parseInt to Number.parseInt for consistency - Prepare for expanded functionality to implement PR changes based on comments
1 parent 3d222a3 commit 20355b3

File tree

7 files changed

+4
-3
lines changed

7 files changed

+4
-3
lines changed
File renamed without changes.
File renamed without changes.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type ReactionType = (typeof VALID_REACTIONS)[number];
2727
/**
2828
* Get input from environment variables (GitHub Actions pattern)
2929
*/
30-
function getInput(name: string, required: boolean = false): string {
30+
function getInput(name: string, required = false): string {
3131
const envName = `INPUT_${name.toUpperCase().replace(/ /g, '_')}`;
3232
const value = process.env[envName] || '';
3333

@@ -101,6 +101,7 @@ async function addReaction(
101101
}
102102
} catch (error) {
103103
if (error instanceof Error) {
104+
// biome-ignore lint/suspicious/noExplicitAny: POC
104105
const apiError = error as any;
105106
const requestId = apiError.response?.headers?.['x-github-request-id'] || 'unknown';
106107
const status = apiError.status || '';
@@ -124,8 +125,8 @@ async function main(): Promise<void> {
124125
const reactionInput = getInput('reaction') || 'eyes';
125126

126127
// Validate inputs
127-
const commentId = parseInt(commentIdStr, 10);
128-
if (isNaN(commentId)) {
128+
const commentId = Number.parseInt(commentIdStr, 10);
129+
if (Number.isNaN(commentId)) {
129130
throw new Error(`Invalid comment_id: ${commentIdStr}. Must be a number.`);
130131
}
131132

0 commit comments

Comments
 (0)