Skip to content

Commit c58e3a9

Browse files
CopilotDavidKRK
andauthored
Stabilize music-social issue rendering by sanitizing commit message and canonicalizing URLs (#242)
* Initial plan * fix: harden music-social issue body formatting --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: David KRK <136035295+DavidKRK@users.noreply.github.com>
1 parent ad13f88 commit c58e3a9

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/music-social.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ jobs:
7878
const sha = process.env.COMMIT_SHA || '';
7979
const shortSha = sha.slice(0, 7);
8080
const defaultCommitMsg = 'Mise à jour manuelle';
81-
const commitMsg = (process.env.COMMIT_MSG || defaultCommitMsg)
82-
.split('\n')
83-
.find(line => line.trim().length > 0) || defaultCommitMsg;
81+
const commitMsg = ((process.env.COMMIT_MSG || defaultCommitMsg)
82+
.split(/\r?\n/)
83+
.find(line => line.trim().length > 0) || defaultCommitMsg).trim();
8484
const author = process.env.COMMIT_AUTHOR || 'DavidKRK';
8585
const linesAdded = process.env.LINES_ADDED;
8686
const linesRemoved = process.env.LINES_REMOVED;
@@ -96,7 +96,7 @@ jobs:
9696
'```',
9797
'🎵 Nouvelle mise à jour sur mon site !',
9898
'',
99-
'🔥 Nouveau contenu musical disponible sur www.davidkrk.com',
99+
'🔥 Nouveau contenu musical disponible sur https://davidkrk.com',
100100
'',
101101
'🎧 DJ & Producteur Techno depuis 1999',
102102
'📍 Saint-Jean-de-Luz, France',
@@ -113,7 +113,7 @@ jobs:
113113
'',
114114
'### SoundCloud / Bandcamp',
115115
'```',
116-
'🔥 New track/mix available! Check it out on www.davidkrk.com',
116+
'🔥 New track/mix available! Check it out on https://davidkrk.com',
117117
'#techno #underground #dj #producer #saintjeandeLuz',
118118
'```',
119119
].join('\n');
@@ -132,7 +132,7 @@ jobs:
132132
`- **Lignes modifiées** : +${linesAdded} / -${linesRemoved}`,
133133
'',
134134
'### 🔗 Liens utiles',
135-
`- 🌐 [Voir music.html en ligne](https://www.davidkrk.com/music.html)`,
135+
`- 🌐 [Voir music.html en ligne](https://davidkrk.com/music.html)`,
136136
`- 📝 [Voir le diff sur GitHub](https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.payload.head_commit?.id || sha})`,
137137
'',
138138
'---',
@@ -142,7 +142,7 @@ jobs:
142142
'---',
143143
'',
144144
'### ✅ Checklist de publication',
145-
'- [ ] Vérifier que le nouveau contenu est visible sur [davidkrk.com/music.html](https://www.davidkrk.com/music.html)',
145+
'- [ ] Vérifier que le nouveau contenu est visible sur [davidkrk.com/music.html](https://davidkrk.com/music.html)',
146146
'- [ ] Poster sur Instagram',
147147
'- [ ] Poster sur Facebook',
148148
'- [ ] Poster sur Twitter / X',

0 commit comments

Comments
 (0)