-
Notifications
You must be signed in to change notification settings - Fork 51
Improved prePR #729
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
base: main
Are you sure you want to change the base?
Improved prePR #729
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,9 @@ object TypelevelKernelPlugin extends AutoPlugin { | |
| "Command aliases defined for this build" | ||
| ) | ||
|
|
||
| lazy val tlPrePRSteps = | ||
| settingKey[List[String]]("Steps to be performed before a user submits a PR") | ||
|
Comment on lines
+48
to
+49
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mostly curious, why did you introduce this setting in the kernel plugin? I think we could introduce and set the default in the CI plugin, without need a blank default. Also the doc can be more specific that these are the steps run by the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added it to kernel because at my work we are using the Github plugin without using
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are only using the kernel plugin, then it's fairly straightforward to do whatever you want directly with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While it is, and I did... I thought I would basically push back up the changes I was making for myself internally. My thought process was that as people add different 'linters' or other things that are expected to pass in CI, such as scalafix/fmt, mima, or sbt-explicit-dependency, or sbt-missinglink , I wanted an easy way to aggregate those into a check at the the same time (in the same auto-plugin) as i was adding the github workflow. What ended up happening in my world is people started defining a command alias called 'build' in each project and just put in the various steps, but somehow it would always be out of sync with what we actually did in CI.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, so the reason I'd prefer to keep prePR in kernel is because we have our own custom ci steps and we'd like the easier to extend prePR. |
||
|
|
||
| @deprecated( | ||
| "Use `tlCommandAliases` for a more composable command definition experience", | ||
| "0.6.1") | ||
|
|
@@ -62,7 +65,8 @@ object TypelevelKernelPlugin extends AutoPlugin { | |
| override def globalSettings = Seq( | ||
| Def.derive(tlIsScala3 := scalaVersion.value.startsWith("3.")), | ||
| tlCommandAliases := Map( | ||
| "tlReleaseLocal" -> List("reload", "project /", "+publishLocal") | ||
| "tlReleaseLocal" -> List("reload", "project /", "+publishLocal"), | ||
| "prePR" -> ("reload" :: "project /" :: tlPrePRSteps.value) | ||
| ), | ||
| onLoad := { | ||
| val aliases = tlCommandAliases.value | ||
|
|
@@ -78,7 +82,8 @@ object TypelevelKernelPlugin extends AutoPlugin { | |
| onUnload.value.compose { (state: State) => | ||
| aliases.foldLeft(state) { (state, alias) => BasicCommands.removeAlias(state, alias) } | ||
| } | ||
| } | ||
| }, | ||
| tlPrePRSteps := List.empty | ||
| ) | ||
|
|
||
| @nowarn("cat=deprecation") | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.