Skip to content

Fetch GitHub Issues #48

Fetch GitHub Issues

Fetch GitHub Issues #48

name: Fetch GitHub Issues
on:
schedule:
# Run daily at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual triggering
push:
branches:
- main
- master
paths:
- '.github/scripts/fetch_github_issues.py'
- '.github/workflows/fetch-github-issues.yml'
jobs:
fetch-issues:
runs-on: ubuntu-latest
permissions:
contents: read
issues: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Fetch GitHub issues
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/scripts/fetch_github_issues.py
- name: Upload issues artifact
uses: actions/upload-artifact@v4
with:
name: github-issues-cache
path: github_issues_cache.json
retention-days: 30
- name: Display summary
run: |
ISSUE_COUNT=$(jq '.issues | length' github_issues_cache.json)
echo "### GitHub Issues Fetch Summary" >> $GITHUB_STEP_SUMMARY
echo "✅ Successfully fetched **${ISSUE_COUNT}** issues" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📦 Artifact uploaded: \`github-issues-cache\`" >> $GITHUB_STEP_SUMMARY