summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2023-01-18 14:33:45 +0100
committerLinus Groh <mail@linusgroh.de>2023-01-18 14:06:05 +0000
commit6ef8100e252838532576c1e9ba820e26c05ef0a9 (patch)
treec9e1bfbdbdb075d2b72ed1cc7ffc0b5dc3d3811d /.github
parent5a1ac851aa4a8a6b4764cb019b9ed24975bd55c2 (diff)
downloadserenity-6ef8100e252838532576c1e9ba820e26c05ef0a9.zip
CI: Ignore dependabot in commit linter for PRs
Dependabot cannot be configured to significantly change the way it formats its commit message, and it currently includes a "Signed-Off-By" tag which is not allowed by our linter. This updates our CI commit linter to exclude bots from the checks.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/lintcommits.yml8
1 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/lintcommits.yml b/.github/workflows/lintcommits.yml
index 2d0bd16d3e..ade728c8db 100644
--- a/.github/workflows/lintcommits.yml
+++ b/.github/workflows/lintcommits.yml
@@ -15,6 +15,9 @@ jobs:
uses: actions/github-script@v6
with:
script: |
+ const excludedBotIds = [
+ 49699333, // dependabot[bot]
+ ];
const rules = [
{
pattern: /^[^\r]*$/,
@@ -62,7 +65,10 @@ jobs:
const commits = await github.paginate(opts);
const errors = [];
- for (const { sha, commit: { message } } of commits) {
+ for (const { sha, commit: { message }, author } of commits) {
+ if (excludedBotIds.includes(author.id)) {
+ continue;
+ }
const commitErrors = [];
for (const { pattern, error } of rules) {
if (!pattern.test(message)) {