Skip to content

Improve the post-login redirect page #20

Improve the post-login redirect page

Improve the post-login redirect page #20

name: Fetch Featured Issues
on:
issues:
types: [opened, labeled]
jobs:
fetch-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch Featured Issues
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Fetch all open issues labeled as "featured"
issues=$(gh issue list --limit 1000 --state all --label "featured" --json number,title,url,author,assignees,createdAt,state,comments)
# 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
# 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 "[email protected]"
git config --local user.name "GitHub Action"
git add packages/frontendmu-data/data/featured-issues.json
git commit -m "Update featured issues"
git push
else
echo "No changes detected in featured-issues.json. Skipping commit."
fi