Pull requests and reviews
This page follows a pull request on the server from the first idea to the release. The last section lists what differs in the other repositories.
Before you start
Section titled “Before you start”- A larger change? Talk about it on Discord first. A short chat can save you a pull request that goes in a different direction from the project.
- A new provider? Read Build a provider first. The community catalog may suit it better than the server.
- Using AI tools? The AI policy applies, see Contribute with AI tools.
- Keep it small. One pull request changes one thing. Small pull requests are reviewed fastest.
- A change to playback, a queue or a player? If you have built the end-to-end test lab, open the pull request as a draft, run it through the lab and put the result in the description.
Pick the branch
Section titled “Pick the branch”| Repository | Target branch |
|---|---|
| server | dev |
| frontend, models, client, mobile-app, desktop-app | main |
| music-assistant.io (user docs) | main for a fix to the live site, beta for anything new, see Write documentation |
Write the title and description
Section titled “Write the title and description”Fill in the pull request template and keep all its sections.
- Title: what changes for users, such as “Fix Sonos hanging after reconnect”. No prefix such as
fix:orfeat:: the release notes use the title as it is. - What does this implement/fix? What you changed and why, with a link to the issue.
- Types of changes: tick exactly one box. It sets the label, and the label picks the section of the release notes (see Releases).
- Checklist: tick what you did. These four are required: tested locally,
pre-commit run --all-filespasses,pytestpasses, and the AI policy.
Two checks read this. PR Checks fails on a prefixed title, a missing template section or an unticked required item, and a bot comments with what to fix; it does not block the merge. PR Labels fails when you tick more than one type of change, or none.
Pass the checks
Section titled “Pass the checks”lint and test must pass before a pull request can merge into dev.
lintrunspre-commit run --all-files.testrunspytest. On a pull request it runs the tests your changed files affect: a change in one provider runs that provider’s tests, a change to shared code runs all of them.
Run both on your machine before you push, see Test your change.
Get reviewed
Section titled “Get reviewed”- The review bots skip drafts. Open a draft while you work on it, and select Ready for review when it is done.
- Copilot reviews once
lintandtestare green on your latest commit, and again after each push. - Bot-MArley, the review bot of the maintainers, reviews within about an hour of your last push. It approves when the review is clean and the change stays inside one provider.
- A maintainer approves the rest:
- a new provider;
- a change to a provider’s
codeownersorsupport_url; - a change to
requirements, or to anything outside one provider’s folders; - a pull request of 1,000 changed lines or more;
- a change to a player provider or other code that talks to a device, until you say in the pull request which real device you tested it on.
Both bots mark each finding [CRITICAL] (must fix), [PROBLEM] (should fix) or [SUGGESTION] (optional). An unresolved [CRITICAL] turns the pull request back into a draft: fix it, then select Ready for review again. Comment @Bot-MArley help for all of the bot’s commands.
NOTE
Music Assistant is maintained by a small team, and most of them review in their spare time. Bot-MArley answers within about an hour; a review by a maintainer can take a while, because there are more pull requests than reviewers.
Answer a review
Section titled “Answer a review”- Answer in the pull request, in the thread of the comment.
- Fix it with a new commit, or say briefly why not. A bot is not always right, and the maintainers have the final say.
- Resolve a thread once it is settled. A pull request with an unresolved thread cannot merge.
- Write your answers in your own words, as the AI policy asks.
After the approval
Section titled “After the approval”dev uses a merge queue. A pull request that is approved, has green checks and no open threads can go into the queue, which runs lint and test again on the latest dev and squashes it into one commit.
For a pull request that only changes the folders of one provider (music_assistant/providers/<domain>/ and tests/providers/<domain>/), a codeowner of that provider comments @Bot-MArley merge on a line of its own, whoever opened it. The bot adds the pull request to the queue once its current commit is approved and the checks are green. After a new push, ask again. A maintainer adds every other pull request to the queue.
After the merge
Section titled “After the merge”The next nightly carries your change, then the next beta, then the stable release that ends that beta cycle. Releases says when each one comes out and how a bugfix is backported to stable.
In the other repositories
Section titled “In the other repositories”- Frontend: fill in its own template, which also links the server pull request your change relies on. A change to the interface needs screenshots or a short video. See Frontend and apps.
- Mobile app: find or file an issue and ask in it before you start, and begin the description with
Closes #<issue number>, as its contributing guide says. - User docs: each pull request builds a Deploy Preview of the whole site with your change in it, see Write documentation.
Music Assistant is a project of the Open Home Foundation.