@@ -101,10 +101,14 @@ if (require.main === module) {
101
101
const printUsage = ( ) => {
102
102
console . log ( 'Usage:' ) ;
103
103
console . log ( ' npx tsx worker/src/agent/tools/github-pr-comments/index.ts get <owner> <repo> <pullRequestId>' ) ;
104
- console . log ( ' npx tsx worker/src/agent/tools/github-pr-comments/index.ts reply <owner> <repo> <pullRequestId> <commentId> <body>' ) ;
104
+ console . log (
105
+ ' npx tsx worker/src/agent/tools/github-pr-comments/index.ts reply <owner> <repo> <pullRequestId> <commentId> <body>'
106
+ ) ;
105
107
console . log ( '\nExamples:' ) ;
106
108
console . log ( ' npx tsx worker/src/agent/tools/github-pr-comments/index.ts get aws-samples remote-swe-agents 32' ) ;
107
- console . log ( ' npx tsx worker/src/agent/tools/github-pr-comments/index.ts reply aws-samples remote-swe-agents 32 1234567890 "Thanks for the feedback!"' ) ;
109
+ console . log (
110
+ ' npx tsx worker/src/agent/tools/github-pr-comments/index.ts reply aws-samples remote-swe-agents 32 1234567890 "Thanks for the feedback!"'
111
+ ) ;
108
112
} ;
109
113
110
114
const runTest = async ( ) => {
@@ -119,7 +123,7 @@ if (require.main === module) {
119
123
120
124
const [ owner , repo , pullRequestId ] = args . slice ( 1 ) ;
121
125
console . log ( `Getting comments for PR #${ pullRequestId } in ${ owner } /${ repo } ...` ) ;
122
-
126
+
123
127
const getResult = await getPRCommentsHandler ( { owner, repo, pullRequestId } ) ;
124
128
console . log ( 'Result:' ) ;
125
129
console . log ( getResult ) ;
@@ -134,18 +138,18 @@ if (require.main === module) {
134
138
135
139
const [ replyOwner , replyRepo , replyPullRequestId , commentId , ...bodyParts ] = args . slice ( 1 ) ;
136
140
const body = bodyParts . join ( ' ' ) ;
137
-
141
+
138
142
console . log ( `Replying to comment ${ commentId } in PR #${ replyPullRequestId } of ${ replyOwner } /${ replyRepo } ...` ) ;
139
143
console . log ( `Message: "${ body } "` ) ;
140
-
144
+
141
145
const replyResult = await replyPRCommentHandler ( {
142
146
owner : replyOwner ,
143
147
repo : replyRepo ,
144
148
pullRequestId : replyPullRequestId ,
145
149
commentId,
146
- body
150
+ body,
147
151
} ) ;
148
-
152
+
149
153
console . log ( 'Result:' ) ;
150
154
console . log ( replyResult ) ;
151
155
break ;
0 commit comments