Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions validate-pr/scripts/validate-pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ module.exports = async ({ github, context, core }) => {
const prAuthor = pullRequest.user.login;
const contributingUrl = `https://github.com/${repo.owner}/${repo.repo}/blob/${context.payload.repository.default_branch}/CONTRIBUTING.md`;

// --- Step 0: Skip allowed bots and service accounts ---
const ALLOWED_BOTS = [
'codecov-ai[bot]',
'dependabot[bot]',
'fix-it-felix-sentry[bot]',
'getsentry-bot',
'github-actions[bot]',
'javascript-sdk-gitflow[bot]',
'renovate[bot]',
];
if (ALLOWED_BOTS.includes(prAuthor)) {
core.info(`PR author ${prAuthor} is an allowed bot. Skipping validation.`);
return;
}

// --- Helper: check if a user has admin or maintain permission on a repo (cached) ---
const maintainerCache = new Map();
async function isMaintainer(owner, repoName, username) {
Expand Down
Loading