RSVP dock is not visible on the meetup page #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch Featured Issues | |
on: | |
issues: | |
types: [opened, labeled] | |
label: | |
types: [created, edited, deleted] | |
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 | |
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 "[email protected]" | |
git config --local user.name "GitHub Action" | |
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 | |
echo "No changes detected in featured-issues.json. Skipping commit." | |
fi |