This repository was archived by the owner on Mar 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-43
lines changed Expand file tree Collapse file tree 2 files changed +26
-43
lines changed Original file line number Diff line number Diff line change @@ -184,29 +184,22 @@ ${COMMENT_TAG}`
184
184
core . info (
185
185
`Creating new review comment for ${ comment . path } :${ comment . start_line } -${ comment . end_line } : ${ comment . message } `
186
186
)
187
+ const commentData : any = {
188
+ owner : repo . owner ,
189
+ repo : repo . repo ,
190
+ pull_number,
191
+ commit_id,
192
+ body : comment . message ,
193
+ path : comment . path ,
194
+ line : comment . end_line
195
+ }
196
+
187
197
if ( comment . start_line !== comment . end_line ) {
188
- await octokit . pulls . createReviewComment ( {
189
- owner : repo . owner ,
190
- repo : repo . repo ,
191
- pull_number,
192
- commit_id,
193
- body : comment . message ,
194
- path : comment . path ,
195
- line : comment . end_line ,
196
- start_side : 'RIGHT' ,
197
- start_line : comment . start_line
198
- } )
199
- } else {
200
- await octokit . pulls . createReviewComment ( {
201
- owner : repo . owner ,
202
- repo : repo . repo ,
203
- pull_number,
204
- commit_id,
205
- body : comment . message ,
206
- path : comment . path ,
207
- line : comment . end_line
208
- } )
198
+ commentData . start_side = 'RIGHT'
199
+ commentData . start_line = comment . start_line
209
200
}
201
+
202
+ await octokit . pulls . createReviewComment ( commentData )
210
203
}
211
204
212
205
commentCounter ++
You can’t perform that action at this time.
0 commit comments