Skip to content

Commit

Permalink
fix: don't include unchanged lines in suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
parkerbxyz committed Oct 10, 2024
1 parent 03b25eb commit 3909c2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54079,7 +54079,7 @@ const changedFiles = parsedDiff.files.filter(

const generateSuggestionBody = (changes) => {
const suggestionBody = changes
.filter(({ type }) => type === 'AddedLine' || type === 'UnchangedLine')
.filter(({ type }) => type === 'AddedLine')
.map(({ content }) => content)
.join('\n')
// Quadruple backticks allow for triple backticks in a fenced code block in the suggestion body
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const changedFiles = parsedDiff.files.filter(

const generateSuggestionBody = (changes) => {
const suggestionBody = changes
.filter(({ type }) => type === 'AddedLine' || type === 'UnchangedLine')
.filter(({ type }) => type === 'AddedLine')
.map(({ content }) => content)
.join('\n')
// Quadruple backticks allow for triple backticks in a fenced code block in the suggestion body
Expand Down

0 comments on commit 3909c2b

Please sign in to comment.