-
Notifications
You must be signed in to change notification settings - Fork 503
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 choosing a custom default branch #2183
Allow choosing a custom default branch #2183
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2183 +/- ##
==========================================
- Coverage 78.18% 77.91% -0.28%
==========================================
Files 131 135 +4
Lines 2251 2291 +40
Branches 60 60
==========================================
+ Hits 1760 1785 +25
- Misses 491 506 +15
Continue to review full report at Codecov.
|
I wonder if there is a way we could adjust it to do multiple passes if branches were set via the .scala-steward.conf file. I know its not a simple hop from here to there, but then it would make sense that projects might set this and then steward could run and help when repositories are in cross-branching situations. Almost all open source projects multi-branch at some point in their project lifecycles. @fthomas do you think that would be feasible? |
I run through this idea over the weekend without success. I don't see a way of allowing this kind of configuration from the Given all that, I strongly believe that this solution is the best one that involves minimal changes, and allow branch selection for a wide range of Scala Steward users. Of course, please @fthomas correct me if I'm wrong 😸 |
Git checks out the repository default branch when it cloned, so if we change it in the steward default branch in the config file, we need to checkout this branch.
Hey @exoego, any chance we could have this reviewed? This is a feature several libraries could benefit from. I've used this version for the past few weeks, and it works like a charm. It creates PRs on several branches, while remembering which ones have been closed on which specific branch, and allows using different |
@alejandrohdezma Thanks for this PR 👍 |
@alejandrohdezma Could you also update the list of CLI arguments in https://github.com/scala-steward-org/scala-steward/blob/master/docs/help.md 🙏 |
Done here :) |
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.
LGTM
I am going to merge this, since this is great addition and changes LGTM. |
What has been done in this PR?
A new
--default-branch
argument has been added to the Scala Steward cli. When this argument is present, its value will be used as the default branch when updating repositories instead of the repository's default branch.Why this change?
This change enables users who run their own instances of Scala Steward to customize the branch in which updates are performed. This will enable multiple use-cases, for example:
This change will be specially useful for users of the Scala Steward GitHub Action after scala-steward-org/scala-steward-action#268 is merged.
Example: