Skip to content

Commit 0f88a07

Browse files
committed
Format and check in ci
1 parent a8d6eba commit 0f88a07

File tree

4 files changed

+28
-10
lines changed

4 files changed

+28
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- uses: VirtusLab/scala-cli-setup@main
2121
with:
2222
scala-cli-version: 1.12.1
23+
- run: scala-cli --server=false fmt --check .
2324
- run: scala-cli --server=false build.scala
2425
- if: github.event_name != 'pull_request'
2526
uses: peaceiris/actions-gh-pages@v4.0.0

migrate-authors.scala

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,19 @@ object MigrateAuthors extends IOApp.Simple {
5858
val authorsYamlPath = Path("_data/authors.yml")
5959
val directoryConfPath = Path("src/blog/directory.conf")
6060
val alreadyMigrated = Set(
61-
"armanbilge", "djspiewak", "jducoeur",
62-
"valencik", "samspills", "lukajcb",
63-
"mpilquist", "satabin", "hkateu",
64-
"bpholt", "rossabaker",
65-
"typelevel", "foundation"
61+
"armanbilge",
62+
"djspiewak",
63+
"jducoeur",
64+
"valencik",
65+
"samspills",
66+
"lukajcb",
67+
"mpilquist",
68+
"satabin",
69+
"hkateu",
70+
"bpholt",
71+
"rossabaker",
72+
"typelevel",
73+
"foundation"
6674
)
6775

6876
def readAuthorsYaml: IO[String] = Files[IO]

migrate-events.scala

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ case class Event(conf: EventConfig, content: String, originalYaml: String) {
9797
cleaned
9898
}
9999

100-
def buildHoconMetadata(date: String, eventDate: String, eventLocation: String, tags: List[String]): String =
100+
def buildHoconMetadata(
101+
date: String,
102+
eventDate: String,
103+
eventLocation: String,
104+
tags: List[String]
105+
): String =
101106
s"""|{%
102107
| laika.html.template: event.template.html
103108
| date: "$date"
@@ -166,8 +171,11 @@ case class Event(conf: EventConfig, content: String, originalYaml: String) {
166171
}
167172

168173
def toLaika(date: String, stage: Int): String = {
169-
val tags = Option.when(conf.title.contains("Summit"))("summits").toList ::: "events" :: Nil
170-
val metadata = buildHoconMetadata(date, conf.date_string, conf.location, tags)
174+
val tags = Option
175+
.when(conf.title.contains("Summit"))("summits")
176+
.toList ::: "events" :: Nil
177+
val metadata =
178+
buildHoconMetadata(date, conf.date_string, conf.location, tags)
171179
val title = s"# ${conf.title}"
172180
val image =
173181
conf.poster_hero.map(img => s"![${conf.title}]($img)").getOrElse("")

migrate-posts.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ case class Post(conf: Conf, content: String, originalYaml: String) {
4343

4444
// Fix links
4545
cleaned = cleaned.replace("/conduct.md", "/code-of-conduct/README.md")
46-
cleaned = cleaned.replace("/code-of-conduct.md", "/code-of-conduct/README.md")
46+
cleaned =
47+
cleaned.replace("/code-of-conduct.md", "/code-of-conduct/README.md")
4748
cleaned = cleaned.replace("/projects", "/projects/README.md")
4849
cleaned = cleaned.replace("/gsoc/ideas", "/gsoc/ideas.md")
4950

@@ -114,7 +115,7 @@ object MigratePosts extends IOApp {
114115
val renameMap: Map[String, String] = Map(
115116
"2023-02-23-gsoc.md" -> "gsoc-2023.md",
116117
"2024-03-02-gsoc.md" -> "gsoc-2024.md",
117-
"2025-02-27-gsoc.md" -> "gsoc-2025.md",
118+
"2025-02-27-gsoc.md" -> "gsoc-2025.md"
118119
)
119120

120121
def getDateAndName(path: Path): Either[Throwable, (String, String)] = {

0 commit comments

Comments
 (0)