Allow the PR step to open pull requests as drafts (--draft): converting afterwards cancels the CI run and wastes billable minutes
The problem
The pipeline's PR step opens pull requests ready for review, with no option to open them as drafts. For a team whose standing rule is "every PR opens and stays draft until it is genuinely finished", that is not a preference mismatch — it actively costs CI money, and the mechanism is worth spelling out because it is not obvious:
- The pipeline opens the PR ready.
- The agent converts it back to draft, as its instructions require.
- Our
ci.ymlskips the browser-test jobs while a PR is draft — so converting to draft supersedes and cancels the in-flight ready-state run. - That cancelled run has already consumed runner minutes and produced nothing.
Every PR the pipeline opens therefore burns one partial browser-suite run that is thrown away. On a private repository those minutes are billable.
There is a second, subtler cost: a window — however brief — where a PR is publicly "ready for review" before its author intended. On a repo with review notifications or a merge process watching PR state, that window is not harmless.
What we would like
A way to have the PR step open the pull request as a draft. Any of these would solve it:
no-mistakes axi run --draft- a global or per-repository config key, e.g.
pr.draft: true - honouring an existing repository convention if one is discoverable
A flag is probably the most useful, since draft-ness is often a property of a particular change rather than of a repository.
Our current workaround, and why it is unsatisfying
The agent watches for the PR the pipeline opened and converts it to draft immediately. It works, but:
- it depends on every agent remembering, every time;
- the conversion is inherently a race against whatever the ready state triggered;
- and it does not recover the cancelled run.
We are also going to try --skip pr and open the draft PR ourselves. That may well work, but it means giving up the pipeline's own PR authoring — which is genuinely good, and which we would rather keep.
Why this seems in keeping with the tool
no-mistakes exists to validate a change before it becomes something other people act on. Opening a pull request ready for review is precisely the moment a change becomes something other people act on. A draft option feels like the same principle applied one step further out.
Happy to test a build or contribute a patch if that is useful — tell us which you would prefer.
Reported from a fleet running no-mistakes v1.48.0 across several repositories.
Source: kunchenguid/no-mistakes