Skip to content

Commit 8747a57

Browse files
committed
Ignore GitHub bots in CLA check
1 parent de8776a commit 8747a57

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

dist/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -9590,7 +9590,9 @@ const missingAuthors = commits.data.filter((commit) => !commit.author?.login);
95909590
if (missingAuthors.length > 0) {
95919591
throw new Error(`PR contains commits without associated GitHub users`);
95929592
}
9593-
const authors = Array.from(new Set(commits.data.map((commit) => commit.author.login))).sort();
9593+
const authors = Array.from(new Set(commits.data
9594+
.filter((commit) => commit.author.type.toLowerCase() !== "bot")
9595+
.map((commit) => commit.author.login))).sort();
95949596
const fileContentResponse = await octokit.rest.repos.getContent({
95959597
owner: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context.payload.pull_request.head.repo.owner.login,
95969598
repo: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context.payload.pull_request.head.repo.name,

src/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ if (missingAuthors.length > 0) {
2525
}
2626

2727
const authors = Array.from(
28-
new Set(commits.data.map((commit) => commit.author!.login))
28+
new Set(
29+
commits.data
30+
.filter((commit) => commit.author!.type.toLowerCase() !== "bot")
31+
.map((commit) => commit.author!.login)
32+
)
2933
).sort();
3034

3135
const fileContentResponse = await octokit.rest.repos.getContent({

0 commit comments

Comments
 (0)