Repository: scala-steward-org/scala-steward (scala)

Issue:
Specify custom preRelease identifier
I have a library that uses `"x.y.z"` for stable releases, and  `"x.y.z+FEAT.<some other metadata>" ` for pre-releases. 

It looks like FEAT is not one of the identifiers known by [Version.Component.Alpha](https://github.com/scala-steward-org/scala-steward/blob/7e312bd5eb80edddc58c6aeb5bfb589a8d1d8708/modules/core/src/main/scala/org/scalasteward/core/data/Version.scala#L163-L176).

So we get scala-steward PRs for the pre-releases of this library.

Is there any way to tell scala-steward that FEAT is a pre-release identifier?

If not, maybe I can make a PR for this? I see a couple options:

* Just add "FEAT" as one of the hard-coded identifiers. It seems relatively common.
* Add a repo-specific configuration that's just a list of snapshot.

Pull request:
Taking a quick first pass. Happy to iterate based on feedback.

Patch:
diff --git a/modules/core/src/main/scala/org/scalasteward/core/data/Version.scala b/modules/core/src/main/scala/org/scalasteward/core/data/Version.scala
index 77f6b72c76..76ac0c6ebc 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/data/Version.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/data/Version.scala
@@ -162,10 +162,11 @@ object Version {
     }
     final case class Alpha(value: String) extends Component {
       def isPreReleaseIdent: Boolean = order < 0
-      def isSnapshotIdent: Boolean = order <= -6
+      def isSnapshotIdent: Boolean = order <= -7
       def order: Int =
         value.toUpperCase match {
-          case "SNAP" | "SNAPSHOT" | "NIGHTLY" => -6
+          case "SNAP" | "SNAPSHOT" | "NIGHTLY" => -7
+          case "FEAT" | "FEATURE"              => -6
           case "ALPHA" | "PREVIEW"             => -5
           case "BETA" | "B"                    => -4
           case "EA" /* early access */         => -3


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/data/VersionTest.scala b/modules/core/src/test/scala/org/scalasteward/core/data/VersionTest.scala
index 12f31408e5..505bbdd330 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/data/VersionTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/data/VersionTest.scala
@@ -225,7 +225,10 @@ class VersionTest extends DisciplineSuite {
       ("0.1.1", List("0.2.1-485fdf3b"), None),
       ("0.1.1-ALPHA", List("0.2.1-485fdf3b"), None),
       ("0.1.1-ALPHA", List("0.2.1-BETA"), None),
-      ("0.1.1", List("0.2.1-BETA"), None)
+      ("0.1.1", List("0.2.1-BETA"), None),
+      ("0.1.1", List("0.2.0-FEAT"), None),
+      ("0.1.1-FEAT", List("0.2.0"), Some("0.2.0")),
+      ("0.1.1-FEAT+3dfde9d7", List("0.2.0"), Some("0.2.0"))
     )
 
     val rnd = new Random()
@@ -277,7 +280,9 @@ class VersionTest extends DisciplineSuite {
       ("0.1.1-3dfde9d7", List("0.1.2"), Some("0.1.2")),
       ("0.1.1", List("0.1.2"), Some("0.1.2")),
       ("0.1.1-RC1", List("0.1.2"), Some("0.1.2")),
-      ("0.1.1-ALPHA", List("0.1.2"), Some("0.1.2"))
+      ("0.1.1-ALPHA", List("0.1.2"), Some("0.1.2")),
+      ("0.1.1", List("0.1.2-FEAT"), Some("0.1.2-FEAT")),
+      ("0.1.1", List("0.1.2-FEAT+3dfde9d7"), None)
     )
 
     val rnd = new Random()