Claude/resolve merge conflicts gd8 hs#26
Conversation
- Add addUTMParams() function for proper link tracking - Articles now include utm_source, utm_medium, utm_campaign, utm_content - Generates README markdown with tracked article links - Maintains feed categories: AI and Cybersecurity
- Changed UTM to utm_medium=reader and utm_campaign=article (user's original params) - Removed ASCII logo to avoid double logo with # 🚀 AI-PULSE title - Updated About section links (removed portfolio, kept stats and reader) - Added proper <div align="center"> structure
- Restore addUTMParams with correct params (utm_medium=reader, utm_campaign=article) - Keep AI PULSE logo with blocks (▄▀) - Use console.error for logs (stderr) to avoid polluting README - Only console.log(readme) for clean output - Ready to generate fresh Jan 15 articles
Removed introductory text and ASCII art from README.
- Add 3 solid CVE-focused cybersecurity sources: Dark Reading, SecurityWeek, Threatpost - Route all Medium/TowardsDataScience links through Freedium to bypass paywall - Total sources: 6 AI + 6 Cybersecurity = 12 quality sources
There was a problem hiding this comment.
Pull request overview
This pull request resolves merge conflicts and introduces changes to the RSS aggregator functionality, including new feed sources, URL tracking modifications, and updated branding elements.
Changes:
- Added 6 new RSS feed sources (4 AI feeds, 2 cybersecurity feeds) to expand content coverage
- Replaced direct article links with UTM-tracked links and Freedium paywall bypass for Medium articles
- Updated branding links from GitHub repository references to GitHub Pages application URLs
- Removed LinkedIn auto-posting functionality and unused
htmlEscapefunction
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| src/aggregator.js | Added new feed sources, replaced getArticleLink with addUTMParams function that adds UTM tracking and Freedium mirror for Medium articles, removed LinkedIn posting code, changed console.log to console.error for aggregation logs |
| README.md | Updated ASCII art banner and removed security badges section from the generated template |
Comments suppressed due to low confidence (1)
src/aggregator.js:3
- The axios import is no longer used after removing the LinkedIn posting functionality. This unused import should be removed to keep the codebase clean.
const axios = require('axios');
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/aggregator.js
Outdated
| // UTM parameters for AI-Pulse traffic tracking | ||
| // Tracks clicks sent FROM AI-Pulse TO external sites | ||
| function addUTMParams(url, category = 'general') { | ||
| // Use Freedium mirror for Medium articles to bypass paywall | ||
| if (url.includes('medium.com') || url.includes('towardsdatascience.com')) { |
There was a problem hiding this comment.
This code modifies URLs to redirect through a third-party paywall bypass service (Freedium) without user consent or transparency. This could violate Medium's Terms of Service and raises ethical concerns about circumventing legitimate paywalls. Consider either removing this functionality or making it an opt-in configuration that users explicitly enable, with clear documentation about the implications.
| // UTM parameters for AI-Pulse traffic tracking | |
| // Tracks clicks sent FROM AI-Pulse TO external sites | |
| function addUTMParams(url, category = 'general') { | |
| // Use Freedium mirror for Medium articles to bypass paywall | |
| if (url.includes('medium.com') || url.includes('towardsdatascience.com')) { | |
| // Optional Freedium mirror usage, enabled explicitly via environment variable | |
| const USE_FREEDIUM_MIRROR = process.env.AI_PULSE_ENABLE_FREEDIUM === 'true'; | |
| // UTM parameters for AI-Pulse traffic tracking | |
| // Tracks clicks sent FROM AI-Pulse TO external sites | |
| function addUTMParams(url, category = 'general') { | |
| // Optionally use Freedium mirror for Medium articles if explicitly enabled | |
| if ( | |
| USE_FREEDIUM_MIRROR && | |
| (url.includes('medium.com') || url.includes('towardsdatascience.com')) | |
| ) { |
src/aggregator.js
Outdated
| // Aggregate feeds by category | ||
| async function aggregateCategory(categoryName, feeds) { | ||
| console.log(`\n📡 Aggregating ${categoryName} feeds...`); | ||
| console.error(`\n📡 Aggregating ${categoryName} feeds...`); |
There was a problem hiding this comment.
Informational log messages should use console.log, not console.error. The console.error function is intended for error messages, not routine status updates. This change makes it difficult to distinguish actual errors from normal operation logs.
src/aggregator.js
Outdated
| for (const feed of feeds) { | ||
| try { | ||
| console.log(` ✓ Fetching: ${feed.name}`); | ||
| console.error(` ✓ Fetching: ${feed.name}`); |
There was a problem hiding this comment.
Success messages should use console.log, not console.error. Using console.error for non-error messages pollutes the error stream and makes debugging more difficult.
src/aggregator.js
Outdated
| async function main() { | ||
| console.log('🚀 Starting AI-Pulse aggregation...\n'); | ||
| console.error('🚀 Starting AI-Pulse aggregation...\n'); |
There was a problem hiding this comment.
Informational startup messages should use console.log, not console.error. This misuse of console.error makes it harder to filter and monitor actual errors in production.
src/aggregator.js
Outdated
| // } | ||
|
|
||
| console.log('\n✅ Aggregation complete!'); | ||
| console.error('\n✅ Aggregation complete!'); |
There was a problem hiding this comment.
Success completion messages should use console.log, not console.error. Routing this through stderr instead of stdout will cause issues with the pipeline in the GitHub Actions workflow that captures stdout for the README.
| console.error('\n✅ Aggregation complete!'); | |
| console.log('\n✅ Aggregation complete!'); |
src/aggregator.js
Outdated
| const utmParams = `utm_source=ai-pulse&utm_medium=reader&utm_campaign=article&utm_content=${category}`; | ||
| return url.includes('?') ? `${url}&${utmParams}` : `${url}?${utmParams}`; |
There was a problem hiding this comment.
After redirecting Medium URLs to Freedium (line 37), the UTM parameters are still appended. However, Freedium may not properly handle or forward these parameters to the original Medium article. Additionally, when the original Medium URL already contains query parameters, the resulting Freedium URL format will be malformed (e.g., https://freedium.cloud/https://medium.com/article?param=value&utm_... instead of properly encoding the original URL).
src/aggregator.js
Outdated
|  | ||
|
|
||
| </div> | ||
|
|
There was a problem hiding this comment.
There's an extra blank line at line 176 that creates unnecessary whitespace in the generated README. Consider removing one of these empty lines for cleaner output.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f39713d519
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/aggregator.js
Outdated
| function addUTMParams(url, category = 'general') { | ||
| // Use Freedium mirror for Medium articles to bypass paywall | ||
| if (url.includes('medium.com') || url.includes('towardsdatascience.com')) { | ||
| url = `https://freedium.cloud/${url}`; |
There was a problem hiding this comment.
Guard addUTMParams for missing item links
addUTMParams assumes url is a string and immediately calls url.includes(...). RSS/Atom items don’t always provide a link field (some feeds only set guid/id), so sanitizeArticle can pass undefined, which throws a TypeError and causes the entire feed to be treated as a fetch failure. This regression can silently drop all articles from any feed with missing/empty links; consider null-checking and returning the original value or a safe fallback when url is falsy.
Useful? React with 👍 / 👎.
No description provided.