We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de4e478 commit d4de047Copy full SHA for d4de047
.github/add-license-headers.sh
@@ -0,0 +1,14 @@
1
+#!/bin/bash
2
+script_path=$(dirname $(realpath $0))/../
3
+
4
+function add_license () {
5
+ (find "$script_path" -name $1 | grep -v "/bin/" | grep -v "/obj/" )|while read fname; do
6
+ line=$(sed -n '2p;3q' "$fname")
7
+ if ! [[ "$line" == " * Licensed to Elasticsearch B.V. under one or more contributor" ]] ; then
8
+ cat "${script_path}.github/license-header.txt" "$fname" > "${fname}.new"
9
+ mv "${fname}.new" "$fname"
10
+ fi
11
+ done
12
+}
13
14
+add_license "*.cs"
.github/workflows/license.yml
@@ -0,0 +1,18 @@
+name: License headers
+on: [ pull_request ]
+permissions:
+ contents: read
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
15
16
+ - name: Check license headers
17
+ run: |
18
+ ./.github/check-license-headers.sh
0 commit comments