My Spotify playlist takes pull requests
说明与用途
在 GitHub 仓库中使用单个文本文件管理 Spotify 播放列表,GitHub Actions 和 Spotify API 自动验证、同步并发布更改,支持通过 pull request 进行协作添加歌曲。
问题
Enabling collaborative song addition to a Spotify playlist via GitHub pull requests while ensuring validation, deduplication, and synchronization without a server or database.
结果
The workflow allows anyone with a GitHub account to propose songs, automatically validates and syncs them to a Spotify playlist, and tracks contributions via git history.
工作流
- Open a "🎵 Add a song" issue with a Spotify link
- A workflow converts the issue into a PR, appends the track to the file, and comments the PR link
- CI validates the PR, checking ID format, duplicates, and Spotify lookup
- Reviewer listens to the track and merges, comments, or rejects the PR
- Merging pushes to main, triggering a sync workflow that replaces the Spotify playlist with the file’s contents
证据
A workflow turns the issue into a PR. It looks the song up on Spotify, appends <link> # Artist - Title to the file, and comments back on the issue with the PR link.
CI validates the PR. Malformed IDs and duplicates fail the check with an annotation on the exact line.
Merging is publishing. A push to main that touches playlists/ runs the sync, and the Spotify playlist now matches the file.
- 记录日期: 2026-10-17T19:56:18.511Z