Skip to content

Commit

Permalink
Merge pull request #224 from n-d-r-d-g/main
Browse files Browse the repository at this point in the history
JSON file typings
  • Loading branch information
MrSunshyne authored Sep 5, 2024
2 parents 7a518ed + 77268d6 commit 088a0b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/featured_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ jobs:
# Save the issues to a featured-issues.json
echo "$issues" | jq 'map({number, title, url, author, assignees, createdAt, state, comments_count: .comments | length})' > packages/frontendmu-data/data/featured-issues.json
echo "export default " > packages/frontendmu-data/data/featured-issues.ts
cat packages/frontendmu-data/data/featured-issues.json | jq '.' >> packages/frontendmu-data/data/featured-issues.ts
sed -i '$d' packages/frontendmu-data/data/featured-issues.ts
echo "] as const" >> packages/frontendmu-data/data/featured-issues.ts
# Check if there are any changes
if [ -n "$(git status --porcelain packages/frontendmu-data/data/featured-issues.json)" ]; then
# Commit and push changes if the file has been modified
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add packages/frontendmu-data/data/featured-issues.json
git add packages/frontendmu-data/data/featured-issues.json packages/frontendmu-data/data/featured-issues.ts
git commit -m "Update featured issues"
git push
else
Expand Down

0 comments on commit 088a0b4

Please sign in to comment.