|
| 1 | +# RSS Feed Automation Setup & Troubleshooting |
| 2 | + |
| 3 | +This directory contains GitHub Actions workflows that automatically update the Expert Hub with the latest GitHub Copilot news and incidents. |
| 4 | + |
| 5 | +## 🤖 Automated Workflows |
| 6 | + |
| 7 | +### 1. `rss-changelog-feed.yml` |
| 8 | +- **Purpose**: Fetches latest GitHub Copilot updates from the GitHub Blog |
| 9 | +- **Schedule**: Runs twice daily (12 AM and 12 PM UTC) |
| 10 | +- **Updates**: `docs/copilot/changelog.json` and `docs/copilot/copilot-changelog.md` |
| 11 | + |
| 12 | +### 2. `rss-incident-feed.yml` |
| 13 | +- **Purpose**: Fetches GitHub status incidents (highlighting Copilot-related ones) |
| 14 | +- **Schedule**: Runs twice daily (12:10 AM and 12:10 PM UTC) |
| 15 | +- **Updates**: `docs/copilot/incidents.json` and `docs/copilot/copilot-incidents.md` |
| 16 | + |
| 17 | +## 🔧 Setup Requirements |
| 18 | + |
| 19 | +### Repository Settings |
| 20 | +The workflows now use the built-in `GITHUB_TOKEN` with `contents: write` permissions. No additional secrets are required. |
| 21 | + |
| 22 | +### Manual Triggers |
| 23 | +Both workflows can be triggered manually via the GitHub Actions UI using the "workflow_dispatch" event. |
| 24 | + |
| 25 | +## 🚨 Common Issues & Solutions |
| 26 | + |
| 27 | +### Issue 1: Workflows Not Running |
| 28 | +**Problem**: Scheduled workflows don't execute |
| 29 | +**Solutions**: |
| 30 | +1. Check if the repository is active (has commits in the last 60 days) |
| 31 | +2. Verify workflows are enabled in repository settings |
| 32 | +3. Check the Actions tab for any error messages |
| 33 | + |
| 34 | +### Issue 2: Permission Denied Errors |
| 35 | +**Problem**: Workflow can't push changes back to repository |
| 36 | +**Solutions**: |
| 37 | +1. Ensure `contents: write` permission is set in workflow |
| 38 | +2. Check if branch protection rules are blocking automated commits |
| 39 | +3. Verify `GITHUB_TOKEN` has necessary permissions |
| 40 | + |
| 41 | +### Issue 3: RSS Feed Parse Errors |
| 42 | +**Problem**: Cannot fetch or parse RSS feeds |
| 43 | +**Solutions**: |
| 44 | +1. Check if the RSS URLs are still valid: |
| 45 | + - Changelog: `https://github.blog/changelog/label/copilot/feed/` |
| 46 | + - Incidents: `https://www.githubstatus.com/history.rss` |
| 47 | +2. Test URLs manually with `curl -I <URL>` |
| 48 | +3. Check for network connectivity issues |
| 49 | + |
| 50 | +### Issue 4: No Changes Detected |
| 51 | +**Problem**: Workflow runs but no updates are committed |
| 52 | +**Solutions**: |
| 53 | +1. This is normal if no new content is available |
| 54 | +2. Check the workflow logs to see if new entries were found |
| 55 | +3. Manually verify the RSS feeds have new content |
| 56 | + |
| 57 | +## 🧪 Testing the Automation |
| 58 | + |
| 59 | +### Manual Testing |
| 60 | +1. Go to Actions tab in your repository |
| 61 | +2. Select either workflow |
| 62 | +3. Click "Run workflow" to trigger manually |
| 63 | +4. Monitor the execution logs |
| 64 | + |
| 65 | +### Local Testing Script |
| 66 | +You can test the RSS parsing locally: |
| 67 | + |
| 68 | +```bash |
| 69 | +# Install dependencies |
| 70 | +npm install rss-parser |
| 71 | + |
| 72 | +# Create and run test script |
| 73 | +node -e " |
| 74 | +const Parser = require('rss-parser'); |
| 75 | +const parser = new Parser(); |
| 76 | +
|
| 77 | +parser.parseURL('https://github.blog/changelog/label/copilot/feed/') |
| 78 | + .then(feed => { |
| 79 | + console.log('Feed Title:', feed.title); |
| 80 | + console.log('Latest Items:', feed.items.slice(0, 3).map(item => ({ |
| 81 | + title: item.title, |
| 82 | + date: item.pubDate |
| 83 | + }))); |
| 84 | + }) |
| 85 | + .catch(console.error); |
| 86 | +" |
| 87 | +``` |
| 88 | + |
| 89 | +## 📊 Monitoring Automation Health |
| 90 | + |
| 91 | +### Check Last Update Times |
| 92 | +- Look at the "Last updated" timestamp in the generated markdown files |
| 93 | +- Check the git commit history for automated commits |
| 94 | + |
| 95 | +### Workflow Status |
| 96 | +- Green checkmark: Successful execution |
| 97 | +- Red X: Failed execution (check logs) |
| 98 | +- Yellow dot: In progress |
| 99 | +- Gray: Workflow disabled or skipped |
| 100 | + |
| 101 | +### Expected Commit Pattern |
| 102 | +Successful runs should create commits with messages like: |
| 103 | +- `🤖 Automated update: Copilot changelog feed [Tue Sep 30 13:45:22 UTC 2025]` |
| 104 | +- `🤖 Automated update: GitHub incidents feed [Tue Sep 30 13:55:18 UTC 2025]` |
| 105 | + |
| 106 | +## 🔄 Updating the Automation |
| 107 | + |
| 108 | +### Changing Update Frequency |
| 109 | +Edit the `cron` schedules in the workflow files: |
| 110 | +```yaml |
| 111 | +on: |
| 112 | + schedule: |
| 113 | + - cron: '0 */6 * * *' # Every 6 hours instead of twice daily |
| 114 | +``` |
| 115 | +
|
| 116 | +### Adding New RSS Sources |
| 117 | +1. Create a new workflow file following the existing pattern |
| 118 | +2. Update the RSS URL and output file paths |
| 119 | +3. Modify the markdown generation logic as needed |
| 120 | +
|
| 121 | +### Customizing Output Format |
| 122 | +Edit the JavaScript code in the "Run JavaScript to convert JSON to Markdown" step to change how the markdown is generated. |
| 123 | +
|
| 124 | +## 🆘 Getting Help |
| 125 | +
|
| 126 | +If the automation is still not working after following this guide: |
| 127 | +
|
| 128 | +1. **Check the workflow logs** in the Actions tab for specific error messages |
| 129 | +2. **Verify RSS feed accessibility** using curl or browser |
| 130 | +3. **Test permissions** by manually triggering a workflow |
| 131 | +4. **Check repository settings** for any restrictions on automated commits |
| 132 | +5. **Look at recent commits** to see if updates are happening but not visible |
| 133 | +
|
| 134 | +The automation should work out of the box for most repositories. The main requirement is that the repository remains active (recent commits) for scheduled workflows to continue running. |
0 commit comments