Feature request: Option to move a PR from "open" to "draft"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- github-actions, typescript
Research direction
The issue names no files or tests; start by tracing the stale action's existing two-level workflow and how it performs pull-request actions. Compare the requested three-level workflow with the simpler stale subaction alternative, then verify that configuration, comments, labels, draft transitions, and closing occur in the intended order.
Written by the indexing model from the issue text.
Description
Description:
Currently the stale action allows a 2-level workflow:
- after X days: mark as stale (+add comment, add label)
- after Y days: close the PR
It could be interesting to allow a 3-level workflow:
- after X days: move PR from "open" to "draft" (+optionally add comment)
- after Y days: mark as stale (+add comment, add label)
- after Z days: close the PR
Alternatively, if this sounds too complicated, an easier first step would be to "move to draft" as an subaction of marking as stale:
- after X days: mark as stale (optionally add comment, optionally add label, +optionally move to draft)
- after Y days: close the PR
Justification:
Personally I find marking PRs as "stale" and closing them as "this should only happen on very old PRs" (many months old). Whereas moving back to draft is "less dramatic".
- Draft PRs are a standard GH feature and have semantically different meaning and behavior.
- For example, PR marked as draft can't be merged by accident.
- Marking PR as draft is leagues better than adding a label:
- drafts are visually distinct from other PRs:
- in PR detail view
/pull/<n>(status icon in top-left of the PR) - in PR list
/pulls, drafts have a different icon as well
- in PR detail view
- drafts are searchable and can be excluded via a standard
-is:draftquery in GitHub searchbox, the query will be the same across all repositories.- For example one can find all review requests assigned to them on non-draft PRs via this query
is:pr is:open user-review-requested:@me -is:draft - (To be fair, one could argue that the same can be achieved by
-label:stale, although the label can be different in each repo, depending on the config).
- For example one can find all review requests assigned to them on non-draft PRs via this query
- drafts are visually distinct from other PRs:
- There are certain third-party integrations for the PRs which have an option to exclude draft PRs. For example GitHub-Slack integration which reminds about pending PR reviews.
Are you willing to submit a PR?
No
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 438
- Avg merge
- 27d 8h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from actions/stale
-
Stale label remains after pushing a new commitPossibly taken @v-chiranjib-swain claimed this 21 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
Closing items while paginating can skip open pull requestsPossibly taken @v-chiranjib-swain claimed this 93 days ago. Openbug
-
Ignore issues which has linked open PRsPossibly taken A pull request linked to this issue is open or already merged. Openfeature request
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
feature request
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
feature request needs triage
Difficulty 1/5 1-3 hours Newbie friendliness 69/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/symphony#91 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
solidjs/solid-docs#1716 ·
Maintainers usually reply within 1 day