Skip to content

Commit

Permalink
Merge pull request #77 from aquasecurity/bugfix/azure-out-of-range-ex…
Browse files Browse the repository at this point in the history
…ception
  • Loading branch information
davidsalame1 authored Mar 26, 2024
2 parents 844341a + 6eab2cb commit decbf40
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/commenter/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ func (c *Azure) WriteMultiLineComment(file, comment string, startLine, endLine i
file = fmt.Sprintf("/%s", file)
}

if startLine == commenter.FIRST_AVAILABLE_LINE {
startLine = 0
if startLine == commenter.FIRST_AVAILABLE_LINE || startLine == 0 {
// Reference: https://developercommunity.visualstudio.com/t/Adding-thread-to-PR-using-REST-API-cause/10598424
startLine = 1
}

if endLine == commenter.FIRST_AVAILABLE_LINE {
endLine = 0
if endLine == commenter.FIRST_AVAILABLE_LINE || endLine == 0 {
// Reference: https://developercommunity.visualstudio.com/t/Adding-thread-to-PR-using-REST-API-cause/10598424
endLine = 1
}

b := Body{
Expand Down

0 comments on commit decbf40

Please sign in to comment.