mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:57:35 +00:00
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.
This commit is contained in:
parent
5a1ac851aa
commit
6ef8100e25
1 changed files with 7 additions and 1 deletions
8
.github/workflows/lintcommits.yml
vendored
8
.github/workflows/lintcommits.yml
vendored
|
@ -15,6 +15,9 @@ jobs:
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
const excludedBotIds = [
|
||||||
|
49699333, // dependabot[bot]
|
||||||
|
];
|
||||||
const rules = [
|
const rules = [
|
||||||
{
|
{
|
||||||
pattern: /^[^\r]*$/,
|
pattern: /^[^\r]*$/,
|
||||||
|
@ -62,7 +65,10 @@ jobs:
|
||||||
const commits = await github.paginate(opts);
|
const commits = await github.paginate(opts);
|
||||||
|
|
||||||
const errors = [];
|
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 = [];
|
const commitErrors = [];
|
||||||
for (const { pattern, error } of rules) {
|
for (const { pattern, error } of rules) {
|
||||||
if (!pattern.test(message)) {
|
if (!pattern.test(message)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue