Chapter IV
Quests: issues, pull requests and QA
Work in the dungeon is GitHub issues. An issue goes from the backlog to a coder, becomes a pull request, is tested in the assay room and is merged. You can watch every step on the chamber's notice board, and step in at any of them.
Where issues come from
- Your project briefs: write what a chamber should build next in the ledger (DungeonMaster & recruits tab), and the DungeonMaster turns it into issues.
- The Issues tab of the ledger, or the notice board, where you can file one yourself.
- Anything already open on GitHub for that repo.
An issue that says Depends on #N waits until #N is closed. Of the rest, the ones holding up the most other work go first, then the oldest.
The notice board
Press E on the board at the far end of a chamber. Its columns:
- Backlog: open issues nobody has picked up. Assign one to a coder from here.
- In progress: coders at work.
- In QA: pull requests being tested, or being fixed after a failed test. Pull requests that people opened (not coders) show here as not tested yet, with a Send to QA button.
- Ready to merge: QA passed, waiting for you or for auto-merge.
- Merged: done.
With auto-assign on for a chamber (in the ledger), free coders take the next issue by themselves. With it off, you hand out issues from the board or from a coder's terminal.
Strangers
On a public repository anyone can open an issue or a pull request, and coders and testers run on your computer. So the dungeon only takes work from the repository's owner, members of the organisation that owns it, and its collaborators. An issue or pull request from anyone else shows on the board as stranger, with no Assign, Send to QA or Preview: nobody works on it, tests it, runs it or merges it, and the DungeonMaster doesn't see it. A pull request from a fork counts as a stranger's too. Read it on GitHub, and if you want it built, file the issue again yourself. The same goes for comments: a coder gets an issue's comments from you, members and collaborators with the issue, and coders and testers are told to treat anything else on GitHub as untrusted and not to read comments themselves. That last part is an instruction, not a lock, so on a public repository keep an eye on what strangers write.
Pull requests
A coder works on a branch called swarm/issue-<n>-<name> and opens a pull request that says Closes #<n>. Coders never push to the default branch and never merge: the dungeon merges, after QA.
QA in the assay room
A free tester checks out the pull request, reads it and its issue, reviews the diff, runs the tests, linters and build, and tries the change in a real browser with screenshots. When the project has GitHub Actions workflows, the tester leaves to them what they already run on the pull request and tests what the change touches; the dungeon merges only once those checks are green. It reinstalls the project's dependencies only when its lock file has changed. The dungeon posts the report on the pull request as a comment: the verdict, a table of checks, the commands run and the screenshots.
With Phone-ready checks on (the default), the tester measures every page a pull request changes at four sizes: a phone (375 × 667), a phone on its side (844 × 390), a tablet (810 × 1080) and a laptop (1280 × 800). A page that scrolls sideways, a missing viewport tag (phones then show the page zoomed out), a control a thumb can't hit (under 44 px), a field under 16 px (iPhone Safari zooms into those) or a button you can't reach fails the round, and the coder gets the numbers (at laptop size only sideways scrolling counts). Only what the pull request causes sends it back: problems that were already there are listed in the report but don't fail it. The check runs in a second browser that imitates a touch screen, so the tester's usual browser stays as it is; neither is Safari, so try your app on a real phone before you launch it.
If QA fails, the report goes back to the coder who wrote it. They fix the branch and it goes back to QA. After three failed rounds the pull request is marked needs you.
QA only tests a fix that changed something: if a fix round ends with the branch still on the commit QA failed, it goes back for another fix instead, and after two such rounds it waits for you. A coder whose terminal is still finishing something on its own is not given new work until it stops.
Merging
With auto-merge on (the default), a pull request merges itself once QA has passed its latest commit and GitHub's checks are green. A new commit that changes no file, such as an empty one pushed to restart a deployment, keeps the pass. If checks fail or it conflicts with the default branch, a coder fixes it and QA tests it again. With auto-merge off, read the pull request and its QA comment on GitHub, then press Merge on the notice board. Merging something that hasn't passed QA asks you to confirm first.