summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSean OMeara <[email protected]>2021-09-28 17:06:50 +0200
committerSean OMeara <[email protected]>2021-09-28 17:06:50 +0200
commit57dd26baa9915102aab86f4fc2155413e2db0738 (patch)
tree16c65d47caba5ac75964ef15e512dcf847635764 /.github
parent05df378dce48db9b44142160e64072d5d3788240 (diff)
adding commit linter
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/badstrings.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/.github/workflows/badstrings.yml b/.github/workflows/badstrings.yml
new file mode 100644
index 00000000..cb8e9669
--- /dev/null
+++ b/.github/workflows/badstrings.yml
@@ -0,0 +1,17 @@
+name: badstrings
+on: [pull_request, push]
+jobs:
+ badstrings:
+ runs-on: ubuntu-latest
+ steps:
+ - name: scanning commit message for bad strings
+ run: |
+ #!/bin/bash
+ set -euo pipefail
+ IFS=$'\n\t'
+ message="${{ github.event.head_commit.message }}"
+
+ strings=($(curl -s https://raw.githubusercontent.com/someara/badstrings/main/strings.txt))
+ for i in ${strings[@]} ; do
+ echo "${message}" | grep -v "$i" &>/dev/null;
+ done