Skip to content

Commit

Permalink
Better error when jira has no description (#374)
Browse files Browse the repository at this point in the history
Co-authored-by: Alok G Singh <[email protected]>
  • Loading branch information
alephnull and Alok G Singh authored Oct 29, 2024
1 parent e7d1b52 commit 905daa9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions policy/jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func (j *JiraClient) GetIssue(id string) (*JiraIssue, error) {
return nil, err
}
var b string
if i.Fields.Description == nil {
return nil, fmt.Errorf("Please add a description to the jira, it is copied to the PR to give reviewers better context")
}
for _, c := range i.Fields.Description.Content {
switch c.Type {
case "paragraph":
Expand Down

0 comments on commit 905daa9

Please sign in to comment.