Skip to content

Commit

Permalink
Add links to PRs labelled with artifact-migrations
Browse files Browse the repository at this point in the history
See #3221
  • Loading branch information
fthomas committed Dec 10, 2023
1 parent b6162bc commit 00f7dab
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 18 deletions.
13 changes: 11 additions & 2 deletions docs/artifact-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

Scala Steward can not only bump versions but also change groupId and/or artifactIds if they have been renamed.

An example pull request that demonstrates this feature is https://github.com/scala-steward-org/scala-steward/pull/2264/files which not only bumped the version but also changed the groupId.
Here is a pull request that demonstrate this feature:

* https://github.com/scala-steward-org/scala-steward/pull/2264/files

More pull requests where Scala Steward applied artifact migrations can be found here:

* [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+artifact-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+artifact-migrations))
* [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+artifact-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+artifact-migrations))

## How does this work?

Scala Steward contains a list of [artifact migrations][migrations] that maps old groupIds and/or artifactIds to their new values.
When an artifact migration for a dependency exists, Scala Steward will look for new versions with the old **and** new groupIds and artifactIds.
If it finds a suitable newer version with the new groupId/artifactId, it will consider it an update of that dependency and change the artifactId/groupId accordingly.
If it finds a suitable newer version with the new groupId/artifactId, it will consider it an update of that dependency and change the groupId/artifactId accordingly.

## Adding artifact migrations to Scala Steward

Expand Down
4 changes: 2 additions & 2 deletions docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ Options and flags:
--disable-default-repo-config
Whether to disable the default repo config file
--scalafix-migrations <uri>
Additional scalafix migrations configuration file (can be used multiple times)
Additional Scalafix migrations configuration file (can be used multiple times)
--disable-default-scalafix-migrations
Whether to disable the default scalafix migration file; default: false
Whether to disable the default Scalafix migration file; default: false
--artifact-migrations <uri>
Additional artifact migration configuration file (can be used multiple times)
--disable-default-artifact-migrations
Expand Down
9 changes: 4 additions & 5 deletions docs/scalafix-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ would not compile with the new version of the dependency.

Here are two pull requests that demonstrate this feature:

* https://github.com/coursier/versions/pull/25
* https://github.com/barambani/http4s-extend/pull/67/files
* https://github.com/fthomas/scalafix-test/pull/6/files

And here are all pull requests where Scala Steward applied Scalafix
migrations:
More pull requests where Scala Steward applied Scalafix migrations can be found here:

* [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations)
* [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+scalafix-migrations))
* [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations)
* [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations))

## How does this work?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ object Cli {
private val scalafixMigrations: Opts[List[Uri]] =
options[Uri](
"scalafix-migrations",
s"Additional scalafix migrations configuration file $multiple"
s"Additional Scalafix migrations configuration file $multiple"
).orEmpty

private val disableDefaultScalafixMigrations: Opts[Boolean] =
flag(
"disable-default-scalafix-migrations",
"Whether to disable the default scalafix migration file; default: false"
"Whether to disable the default Scalafix migration file; default: false"
).orFalse

private val scalafixCfg: Opts[ScalafixCfg] =
Expand Down
13 changes: 11 additions & 2 deletions modules/docs/mdoc/artifact-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@

Scala Steward can not only bump versions but also change groupId and/or artifactIds if they have been renamed.

An example pull request that demonstrates this feature is https://github.com/scala-steward-org/scala-steward/pull/2264/files which not only bumped the version but also changed the groupId.
Here is a pull request that demonstrate this feature:

* https://github.com/scala-steward-org/scala-steward/pull/2264/files

More pull requests where Scala Steward applied artifact migrations can be found here:

* [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+artifact-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+artifact-migrations))
* [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+artifact-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+artifact-migrations))

## How does this work?

Scala Steward contains a list of [artifact migrations][migrations] that maps old groupIds and/or artifactIds to their new values.
When an artifact migration for a dependency exists, Scala Steward will look for new versions with the old **and** new groupIds and artifactIds.
If it finds a suitable newer version with the new groupId/artifactId, it will consider it an update of that dependency and change the artifactId/groupId accordingly.
If it finds a suitable newer version with the new groupId/artifactId, it will consider it an update of that dependency and change the groupId/artifactId accordingly.

## Adding artifact migrations to Scala Steward

Expand Down
9 changes: 4 additions & 5 deletions modules/docs/mdoc/scalafix-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ would not compile with the new version of the dependency.

Here are two pull requests that demonstrate this feature:

* https://github.com/coursier/versions/pull/25
* https://github.com/barambani/http4s-extend/pull/67/files
* https://github.com/fthomas/scalafix-test/pull/6/files

And here are all pull requests where Scala Steward applied Scalafix
migrations:
More pull requests where Scala Steward applied Scalafix migrations can be found here:

* [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations)
* [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+scalafix-migrations))
* [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations)
* [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations&type=pullrequests)
([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations))

## How does this work?
Expand Down

0 comments on commit 00f7dab

Please sign in to comment.