-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d18ad4e
commit 518b6c7
Showing
6 changed files
with
75 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Headers | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
check-headers: | ||
name: Check headers | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java 8 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
|
||
- name: Cache Coursier cache | ||
uses: coursier/cache-action@v6.4.0 | ||
|
||
- name: Check headers | ||
run: sbt +headerCheckAll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import sbt._ | ||
|
||
import de.heikoseeberger.sbtheader.HeaderPlugin | ||
import de.heikoseeberger.sbtheader.HeaderPlugin.{ autoImport => SbtHeaderKeys } | ||
|
||
object Header extends AutoPlugin { | ||
override def requires = plugins.JvmPlugin && HeaderPlugin | ||
override def trigger = allRequirements | ||
import SbtHeaderKeys.{ HeaderFileType, HeaderCommentStyle, HeaderLicense } | ||
|
||
override def projectSettings = Seq( | ||
SbtHeaderKeys.headerMappings ++= Map( | ||
HeaderFileType.scala -> HeaderCommentStyle.cStyleBlockComment, | ||
HeaderFileType.java -> HeaderCommentStyle.cStyleBlockComment | ||
), | ||
SbtHeaderKeys.headerLicense := Some( | ||
HeaderLicense.Custom( | ||
"""|Sbt Pull Request Validator | ||
|Copyright Lightbend and Hewlett Packard Enterprise | ||
| | ||
|Licensed under Apache License 2.0 | ||
|SPDX-License-Identifier: Apache-2.0 | ||
| | ||
|See the NOTICE file distributed with this work for | ||
|additional information regarding copyright ownership. | ||
|""".stripMargin | ||
) | ||
) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value | ||
|
||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") | ||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.0.0") | ||
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") | ||
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.22.0") |
17 changes: 6 additions & 11 deletions
17
src/main/scala/com/github/sbt/pullrequestvalidator/ValidatePullRequest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters