File tree Expand file tree Collapse file tree 6 files changed +75
-15
lines changed
github/sbt/pullrequestvalidator Expand file tree Collapse file tree 6 files changed +75
-15
lines changed Original file line number Diff line number Diff line change 1+ name : Headers
2+
3+ on :
4+ pull_request :
5+
6+ permissions : {}
7+
8+ jobs :
9+ check-headers :
10+ name : Check headers
11+ runs-on : ubuntu-20.04
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ - name : Setup Java 8
17+ uses : actions/setup-java@v4
18+ with :
19+ distribution : temurin
20+ java-version : 8
21+
22+ - name : Cache Coursier cache
23+ uses : coursier/cache-action@v6.4.0
24+
25+ - name : Check headers
26+ run : sbt +headerCheckAll
Original file line number Diff line number Diff line change 1- lazy val `sbt-pull-request-validator` = (project in file(" ." ))
2- .enablePlugins(AutomateHeaderPlugin )
1+ lazy val `sbt-pull-request-validator` = project in file(" ." )
32
43sbtPlugin := true
54enablePlugins(SbtPlugin )
@@ -13,7 +12,6 @@ organization := "com.github.sbt"
1312homepage := Some (url(" https://github.com/sbt/sbt-pull-request-validator" ))
1413licenses := Seq (" Apache-2.0" -> url(" http://www.apache.org/licenses/LICENSE-2.0" ))
1514
16- organizationName := " Hewlett Packard Enterprise"
1715startYear := Some (2018 )
1816
1917// https://mvnrepository.com/artifact/org.kohsuke/github-api
Original file line number Diff line number Diff line change 1+ import sbt ._
2+
3+ import de .heikoseeberger .sbtheader .HeaderPlugin
4+ import de .heikoseeberger .sbtheader .HeaderPlugin .{ autoImport => SbtHeaderKeys }
5+
6+ object Header extends AutoPlugin {
7+ override lazy val requires = plugins.JvmPlugin && HeaderPlugin
8+ override lazy val trigger = allRequirements
9+ import SbtHeaderKeys .{ HeaderFileType , HeaderCommentStyle , HeaderLicense }
10+
11+ override lazy val projectSettings = Seq (
12+ SbtHeaderKeys .headerMappings ++= Map (
13+ HeaderFileType .scala -> HeaderCommentStyle .cStyleBlockComment,
14+ HeaderFileType .java -> HeaderCommentStyle .cStyleBlockComment
15+ ),
16+ SbtHeaderKeys .headerLicense := Some (
17+ HeaderLicense .Custom (
18+ """ |Sbt Pull Request Validator
19+ |Copyright Lightbend and Hewlett Packard Enterprise
20+ |
21+ |Licensed under Apache License 2.0
22+ |SPDX-License-Identifier: Apache-2.0
23+ |
24+ |See the NOTICE file distributed with this work for
25+ |additional information regarding copyright ownership.
26+ |""" .stripMargin
27+ )
28+ )
29+ )
30+ }
Original file line number Diff line number Diff line change 11libraryDependencies += " org.scala-sbt" %% " scripted-plugin" % sbtVersion.value
22
33addSbtPlugin(" com.github.sbt" % " sbt-ci-release" % " 1.5.12" )
4- addSbtPlugin(" de.heikoseeberger" % " sbt-header" % " 5.0 .0" )
4+ addSbtPlugin(" de.heikoseeberger" % " sbt-header" % " 5.10 .0" )
55addSbtPlugin(" org.scalameta" % " sbt-scalafmt" % " 2.5.2" )
66addSbtPlugin(" com.github.sbt" % " sbt-github-actions" % " 0.22.0" )
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2018 Hewlett Packard Enterprise
2+ * Sbt Pull Request Validator
3+ * Copyright Lightbend and Hewlett Packard Enterprise
34 *
4- * Licensed under the Apache License, Version 2.0 (the "License");
5- * you may not use this file except in compliance with the License.
6- * You may obtain a copy of the License at
5+ * Licensed under Apache License 2.0
6+ * SPDX-License-Identifier: Apache-2.0
77 *
8- * http://www.apache.org/licenses/LICENSE-2.0
9- *
10- * Unless required by applicable law or agreed to in writing, software
11- * distributed under the License is distributed on an "AS IS" BASIS,
12- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- * See the License for the specific language governing permissions and
14- * limitations under the License.
8+ * See the NOTICE file distributed with this work for
9+ * additional information regarding copyright ownership.
1510 */
1611
1712package com .github .sbt .pullrequestvalidator
Original file line number Diff line number Diff line change 1+ /*
2+ * Sbt Pull Request Validator
3+ * Copyright Lightbend and Hewlett Packard Enterprise
4+ *
5+ * Licensed under Apache License 2.0
6+ * SPDX-License-Identifier: Apache-2.0
7+ *
8+ * See the NOTICE file distributed with this work for
9+ * additional information regarding copyright ownership.
10+ */
11+
112package com .hpe
213
314package object sbt {
You can’t perform that action at this time.
0 commit comments