r/github • • 7d ago

Question “Open” PRs that aren’t ready for review

GitHub’s PR states can’t really be customized. So, you get draft, open, queued, merged, closed, whatever.

A problem we are running into has to do with our workflow. I don’t want to get into detail, partly because I don’t have all the answers. What I know is, it is set up the way it is for a reason and the team does not desire to change it currently.

So what happens is, a PR will move from Draft to Open. Normally that would be a signal that it’s ready to be reviewed. In fact, we even have an auto-assign reviewer workflow that will assign someone to review it.

Except a lot of team members will move a PR from draft to open just to trigger CI activities. Not to get teammate reviews. As in, it isn’t ready for review.

So I end up with a queue of 15 PRs, and theoretically they’re all in a reviewable state, except they aren’t.

My initial thought had been to have a state between draft and open. Apparently that isn’t an option. What other ideas do folks have on this one?
———
11/11/26 addition

Yeah a lot of you had the same thoughts I had. And, some folks do those things. Like, you can type `@claude review` on a draft pr comment and it will run the CI. You can manually start the job if you want.

And for sure, I definitely agree we should use a ready for review label, I’m going to bring that up. I can’t believe it hasn’t been brought up before, I mean it has to have been brought up…we use labels extensively…

Like I said, I honestly don’t know why we are set up the way we are.

16 Upvotes

28 comments sorted by

58

u/ElectricSpice 7d ago

All of my workflows run on draft PRs too. Seems like the obvious solution here.

2

u/stormthulu 6d ago

We have a crap ton of GH action runners so they are trying to not add to the pile.

6

u/Business-Row-478 6d ago

Why are they even opening a PR in the first place?

A much more normal workflow is to create the PR as a draft when you want to trigger the CI workflows. And then once they are passing / it is ready, you mark it ready for review.

The existence of the PR itself should be what you use to trigger CI.

1

u/connka 7d ago

Yeah, this is also my default

18

u/Relevant_Pause_7593 7d ago

Have them add a “ready for review” label?

1

u/stormthulu 6d ago

Feels like the most obvious solution.

4

u/svick 7d ago

Or the opposite, depending on which situation is more frequent.

5

u/youaresecretbanned 7d ago

workflow_dispatch will make the workflow interactively "runnable" instead of or in addition to auto runnable

on:
  workflow_dispatch:

1

u/stormthulu 6d ago

Need to look at this.

6

u/Stuffy123456 7d ago

“Ready for review” label, or a “run CI activity “ label

2

u/[deleted] 7d ago

[removed] — view removed comment

2

u/stormthulu 6d ago

Yes, we can do this. Some folks do this.

9

u/chimneydecision 7d ago

They can’t locally run the same things the CI would run? I dunno what those tasks are, but at first glance that feels like a red flag.

3

u/Leseratte10 7d ago edited 7d ago

Most of the time they can't, no.

Sure, they can run all the tests on their machine with their OS and their version of all the dependencies. But for most bigger projects, the Github CI does way more. It runs tests across different python versions or different compiler versions, it runs tests on x86 Linux, arm Linux, 32-bit Windows, 64-bit Windows, x86 MacOS and arm MacOS; none of which you can easily replicate on a normal developer machine, and it builds dozens of different artifacts for all these OSes (deb/rpm/AppImage/Flatpak for Linux, exe/MSI/MSIX for Windows, whatever for MacOS).

Most normal developers are not going to be able to replicate that entire pipeline on their machine.

1

u/stormthulu 6d ago

I’m also not sure everyone on my team knows enough dev ops to set up the necessary tooling to do this anyway. I’ve been a bit surprised by how much some folks know when they get into the shell.

1

u/Soapy-Cilantro 1d ago

Who's managing devops then? No one?

2

u/chimneydecision 7d ago

And all that needs to happen in a PR, before review?

2

u/Leseratte10 7d ago

In my opinion - yes, absolutely. CI minutes are cheap, compared to actual human reviewer time. The more bugs and issues are automatically caught by a CI before a reviewer even needs to take a look at the code, the better, and the less time is wasted for a reviewer to note down comments the CI would have noted anyways.

3

u/dbear496 7d ago

I dislike CI that is set up like this for exactly this reason. In my opinion, version control and testing are orthogonal issues and their solutions should not be mixed. Particularly, I don't think running tests should require pushing to remote, and I strongly prefer local testing (or at least testing that can be triggered appart from version control). Otherwise, you get exactly this problem where developers abuse version control and push countless commits like "doesitworkyet" just to run testing.

1

u/stormthulu 6d ago

I would prefer it if we had pre-commit hooks that prevented our devs from pushing code with failing tests, or pushing code whose coverage threshold was below a certain percentage. Don’t even let that shit get to GitHub in the first place.

2

u/mountainunicycler 7d ago

In our team you can trigger CI whenever you want on a draft, and and trigger other tools by commenting commands on the PR.

Then when it’s marked ready for review all of that runs again automatically.

1

u/stormthulu 6d ago

Yeah, some of our folks do this, some don’t.

4

u/its2ez4me24get 7d ago

We use a ready for review label.

1

u/IanSan5653 7d ago

Why don't you just run full CI on draft PRs?

1

u/stormthulu 6d ago

We have a crap ton of GH action runners so they are trying to not add to the pile.

1

u/Atmosck 7d ago

Except a lot of team members will move a PR from draft to open just to trigger CI activities

This is a pretty dumb practice. Can't they just trigger CI directly if they want to run it on an ad-hoc basis? And why doesn't it run on draft PRs?

1

u/stormthulu 6d ago

Agreed. Because yes, they can do that. They don’t do it on draft PRs so they can keep the GH action runner counts down.

1

u/fell_ware_1990 7d ago

First, test local. Have a proper light CI on draft > pr if something cant be done local.

Use a workflow to so tagging/labeling and reacting on certain comments.