Skip to content

Commit

Permalink
fix not handling error parsing for description
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar authored Jul 11, 2024
1 parent 88441b7 commit d8960f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Impact: [Major/Minor/Tiny]`
})

const content = message.content[0].text
const description = content.split("Description:")?.[1].split("Impact:")[0]
const impact = content.split("Impact:")?.[1]
const description = content.split("Description:")?.[1]?.split("Impact:")[0] ?? ""
const impact = content.split("Impact:")?.[1] ?? ""

const analysis: AnalyzedPR = {
number: pr.number,
Expand Down

0 comments on commit d8960f3

Please sign in to comment.