Reduce false-positive “New Music Update” issues by diffing net-new music links#274
Conversation
|
|
There was a problem hiding this comment.
Pull request overview
This PR tightens the music-social workflow’s “New Music Update” trigger by comparing the set of music links found inside the <!-- YOUTUBE-AUTO-START --> … <!-- YOUTUBE-AUTO-END --> block between the previous and current versions of music.html, and only opening an issue when net-new links are detected.
Changes:
- Replaced the prior “added lines contain a music domain” heuristic with an old-vs-new link set diff (
comm -13) scoped to the auto-generated YouTube block. - Expanded link matching to cover YouTube watch/shorts/youtu.be URLs, SoundCloud URLs, and Bandcamp (including subdomains).
- Enforced locale-stable sorting for deterministic set comparisons (
LC_ALL=C sort -u,LC_ALL=C comm).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| extract_music_links() { | ||
| echo "$1" | grep -oiE "$MUSIC_LINK_PATTERN" | LC_ALL=C sort -u | ||
| } |
DavidKRK
left a comment
There was a problem hiding this comment.
Le correctif est clair et améliore bien la détection des vrais nouveaux liens musicaux en comparant l’état précédent et l’état actuel du bloc auto-généré.
La logique est plus robuste et devrait réduire les faux positifs. Rien à signaler de bloquant.
music-socialwas still opening “New Music Update” issues on non-content edits inmusic.html(e.g., rewrites/format churn in the auto-generated YouTube block).This PR narrows detection to actual new music links introduced in
<!-- YOUTUBE-AUTO-START --> ... <!-- YOUTUBE-AUTO-END -->.Detection logic hardening
comm -13).Link matching scope
youtu.beshort URLsDeterministic comparison
LC_ALL=C sort -u+LC_ALL=C comm) to keep set-diff behavior consistent across runners.