-
Notifications
You must be signed in to change notification settings - Fork 506
Allow configuring Pull Requests to be 'draft' #3628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring Pull Requests to be 'draft' #3628
Conversation
c302d88
to
a9f05e3
Compare
This addresses one of the small remaining problems with handling scala-steward-org#3612 . Co-authored-by: Jamie B <[email protected]>
a9f05e3
to
45087df
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3628 +/- ##
=======================================
Coverage 89.83% 89.83%
=======================================
Files 174 174
Lines 5045 5045
Branches 488 431 -57
=======================================
Hits 4532 4532
Misses 513 513 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks for the PR, @rtyley and @JamieB-gu! Using a boolean for |
I guess with pullRequests.preReleasesAsDrafts = true
updates.allowPreReleases = [
{ groupId = "com.gu" },
# all other groupIds of your internal libraries
] and then get draft PRs for Guardian pre-releases and regular PRs for everything else. |
Actually, for #3612, we've already decided we'll have to specifically generate a
The clashes with elements in our normal config include:
As we already have to generate a specific Just to be clear, we anticipate having a normal scheduled Scala Steward job running with our normal It's also possible, that although I'm focussing on the preview-of-a-new-library-release use-case, we might also want to raise draft PRs for non-preview releases - it's often the case that updating a dependency version number is not enough to get an update PR to compile - manual code updates may be required - and we might want to put that work on the developer of the update, rather than the teams maintaining the consuming repos, so draft PRs would still be appropriate until the PR is in a state fit for maintaining teams to review. Consequently we would probably prefer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed explanation @rtyley! The simple pullRequests.draft
boolean (as in this PR) seems like a good fit for what you're trying to achieve.
Thanks for approving the PR @fthomas ! Is it ok to also merge at this point? I don't have merge permissions in this repo! |
This addresses one of the small remaining problems with handling #3612 - if we're raising a large number of PRs for a preview version of a library, we don't want those PRs to immediately trigger review-requests for all the maintainers of those repos.
If the PRs are raised in draft, then we can see the results of CI on the PRs, and manually promote them to non-draft PRs for review later.
With this PR, the desired behaviour can be configured in
.scala-steward.conf
, like this:scala-steward/docs/repo-specific-configuration.md
Lines 87 to 90 in 45087df
Initial support for creating draft PRs in Scala Steward was added with #1961 in February 2021, tho' this was specific to PRs changing the Scala version, rather than updating dependencies, and as support for updating Scala version in Scala Steward improved, the raise-in-draft behaviour was removed with #2081 in April 2021.
PR prepared with @JamieB-gu!