Skip to content

Commit

Permalink
[chore] Do not fail if JSON is not found in previous issue (#33395)
Browse files Browse the repository at this point in the history
**Description:**

Avoid crashing when JSON section is not present in previous ISSUE

**Link to tracking Issue:**

#33388 

**Testing:**
```
act -j get_issues  -e <(echo '{"repository": {"owner": {"login": "your-github-username"}}}') -s GITHUB_TOKEN=<your-token>
```
  • Loading branch information
LucaLanziani committed Jun 6, 2024
1 parent b7d644d commit bebbcc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/scripts/generate-weekly-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ function parseJsonFromText(text) {
// Parse the found string to JSON
return JSON.parse(match[1]);
} else {
throw new Error("JSON data not found");
debug({msg: "No JSON found in previous issue"})
return null
}
}

Expand Down

0 comments on commit bebbcc9

Please sign in to comment.