-
-
Notifications
You must be signed in to change notification settings - Fork 1
Claude/configurable news reader g1 gdx #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1182bcf
7673d63
8afbf6f
fe0fac2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,22 +43,42 @@ jobs: | |||||||||||||||||||||
| with: | ||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Ensure security branch exists | ||||||||||||||||||||||
| - name: Ensure security branch exists and is up to date | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| git fetch origin security 2>/dev/null || git switch --create security | ||||||||||||||||||||||
| git push origin security || true | ||||||||||||||||||||||
| git fetch origin main | ||||||||||||||||||||||
| if git fetch origin security 2>/dev/null; then | ||||||||||||||||||||||
| # Security branch exists, check if it's behind main | ||||||||||||||||||||||
| git checkout security | ||||||||||||||||||||||
| BEHIND=$(git rev-list --count HEAD..origin/main) | ||||||||||||||||||||||
| if [ "$BEHIND" -gt 50 ]; then | ||||||||||||||||||||||
| echo "Security branch is $BEHIND commits behind main. Resetting to main..." | ||||||||||||||||||||||
| git reset --hard origin/main | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
| else | ||||||||||||||||||||||
| # Security branch doesn't exist, create from main | ||||||||||||||||||||||
| echo "Creating security branch from main..." | ||||||||||||||||||||||
| git checkout -b security origin/main | ||||||||||||||||||||||
| fi | ||||||||||||||||||||||
| git push origin security --force-with-lease || git push origin security || true | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Merge dependabot changes to dependencies branch | ||||||||||||||||||||||
| - name: Merge dependabot changes to security branch | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| git config --global user.name 'github-actions[bot]' | ||||||||||||||||||||||
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Fetch the PR branch | ||||||||||||||||||||||
| git fetch origin ${{ github.head_ref }}:${{ github.head_ref }} || true | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Switch to security and merge | ||||||||||||||||||||||
| git switch security | ||||||||||||||||||||||
| git merge origin/${{ github.head_ref }} --no-edit || true | ||||||||||||||||||||||
| # Switch to security branch | ||||||||||||||||||||||
| git checkout security || git checkout -b security origin/main | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Try to merge, abort if conflicts | ||||||||||||||||||||||
| if ! git merge origin/${{ github.head_ref }} --no-edit; then | ||||||||||||||||||||||
| echo "Merge conflict detected, aborting and retrying with main as base..." | ||||||||||||||||||||||
| git merge --abort || true | ||||||||||||||||||||||
| git reset --hard origin/main | ||||||||||||||||||||||
| git merge origin/${{ github.head_ref }} --no-edit || true | ||||||||||||||||||||||
|
Comment on lines
+76
to
+80
|
||||||||||||||||||||||
| if ! git merge origin/${{ github.head_ref }} --no-edit; then | |
| echo "Merge conflict detected, aborting and retrying with main as base..." | |
| git merge --abort || true | |
| git reset --hard origin/main | |
| git merge origin/${{ github.head_ref }} --no-edit || true | |
| if ! git merge ${{ github.head_ref }} --no-edit; then | |
| echo "Merge conflict detected, aborting and retrying with main as base..." | |
| git merge --abort || true | |
| git reset --hard origin/main | |
| git merge ${{ github.head_ref }} --no-edit || true |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -260,6 +260,14 @@ function addUTMParams(url, category = 'general') { | |||||||||||||||||
| if (mediumHosts.includes(hostname)) { | ||||||||||||||||||
| url = `https://freedium.cloud/${url}`; | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| // Liste des domaines avec paywalls stricts | ||||||||||||||||||
| const paywalledHosts = ['ft.com', 'wsj.com', 'economist.com', 'bloomberg.com', 'investing.com']; | ||||||||||||||||||
|
|
||||||||||||||||||
| // Ajouter Archive.ph en query parameter pour fallback | ||||||||||||||||||
| if (paywalledHosts.some(host => hostname.includes(host))) { | ||||||||||||||||||
|
||||||||||||||||||
| if (paywalledHosts.some(host => hostname.includes(host))) { | |
| if (paywalledHosts.some(host => hostnameMatches(hostname, host))) { |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le bloc paywalledHosts est actuellement un no-op (aucune action dans le if) et ajoute du code mort / un commentaire trompeur ("Ajouter Archive.ph"), ce qui rend addUTMParams() plus difficile à maintenir. Soit implémenter réellement le fallback (ex: retourner une URL archive, ou exposer l’URL de fallback via un champ séparé), soit supprimer entièrement ce bloc.
| // Liste des domaines avec paywalls stricts | |
| const paywalledHosts = ['ft.com', 'wsj.com', 'economist.com', 'bloomberg.com', 'investing.com']; | |
| // Ajouter Archive.ph en query parameter pour fallback | |
| if (paywalledHosts.some(host => hostname.includes(host))) { | |
| // On ne change pas l'URL ici, on l'utilisera comme fallback | |
| } |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tryPaywallBypass() ne retourne pas l’URL réellement utilisée (bypassUrl), et plus bas createSafeDom(bypassResult.html, resolvedArticleUrl) utilise l’URL d’origine comme base. Pour des HTML provenant de archive.ph / web.archive.org, cela peut casser la résolution des liens relatifs et fausser les heuristiques Readability. Retourner bypassUrl (ou finalUrl) et l’utiliser comme second paramètre de createSafeDom afin que document.URL/baseURI reflète la page parsée.
| const bypassDom = createSafeDom(bypassResult.html, resolvedArticleUrl); | |
| // Utiliser l'URL réellement utilisée par le service de bypass (si fournie) | |
| const bypassBaseUrl = bypassResult.finalUrl || bypassResult.bypassUrl || resolvedArticleUrl; | |
| const bypassDom = createSafeDom(bypassResult.html, bypassBaseUrl); |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La logique imbriquée autour du cas "contenu normal" (paywall/boilerplate) a une indentation incohérente et des blocs else difficiles à lire (ex: if (!computedSummary...) n’est pas indenté sous le else). Merci de réindenter/reformater ce bloc pour éviter des erreurs futures lors de modifications (et faciliter la vérification des accolades/branches).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans l’étape "Ensure security branch exists",
git checkout securitypeut échouer si la branche localesecurityn’existe pas (actions/checkout ne la crée pas forcément). Il faut checkout/mettre à jour explicitement depuisorigin/security(ex: créer/forcer la branche locale à pointer surorigin/security) avant de calculer le retard et éventuellement reset.