From 8428ed89aa858497f364b945a6b73b4fa4d441e7 Mon Sep 17 00:00:00 2001 From: Sayanth <13906889+SayanthD@users.noreply.github.com> Date: Thu, 7 May 2026 23:06:59 +0530 Subject: [PATCH 1/2] Filter bots from the contributors list --- src/services/contributors.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/contributors.ts b/src/services/contributors.ts index b8e99a7d..2459d6ba 100644 --- a/src/services/contributors.ts +++ b/src/services/contributors.ts @@ -1,6 +1,8 @@ import { getBackend, getConfig } from '../config'; import type { Env } from '../types'; +const botNames = ['semantic-release-bot', 'revanced-bot', 'dependabot[bot]', 'github-actions[bot]', 'pre-commit-ci[bot]']; + export async function getContributors(env: Env) { const backend = getBackend(env); const { organization, contributorRepos } = getConfig(env); @@ -11,7 +13,9 @@ export async function getContributors(env: Env) { return { name, url: backend.repositoryUrl(organization, repo), - contributors: contributors.map((contributor) => ({ + contributors: contributors + .filter((contributor) => !botNames.includes(contributor.name)) + .map((contributor) => ({ name: contributor.name, avatar_url: contributor.avatarUrl, url: contributor.url, From cc26cee0aca33873e1f7d925bb941d862463b49e Mon Sep 17 00:00:00 2001 From: Sayanth <13906889+SayanthD@users.noreply.github.com> Date: Fri, 8 May 2026 00:07:11 +0530 Subject: [PATCH 2/2] Move ignored contributors list to env and setup config --- .env.example | 2 ++ src/config.ts | 2 ++ src/services/contributors.ts | 6 ++---- src/types.ts | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 0d64fcba..972ef615 100644 --- a/.env.example +++ b/.env.example @@ -16,4 +16,6 @@ MANAGER_DOWNLOADERS_ASSET_REGEX=apk$ CONTRIBUTORS_REPOS=revanced-manager:ReVanced Manager,revanced-patches:ReVanced Patches,revanced-cli:ReVanced CLI,revanced-documentation:ReVanced Documentation,revanced-website:ReVanced Website,revanced-patcher:ReVanced Patcher,revanced-api:ReVanced API,revanced-manager-downloaders:ReVanced Manager Downloaders,revanced-bots:ReVanced Bots,revanced-library:ReVanced Library,revanced-patches-gradle-plugin:ReVanced Patches Gradle Plugin,revanced-patches-template:ReVanced Patches Template,revanced-cloudflare-email-worker:ReVanced Cloudflare Email Worker,revanced-encrypt:ReVanced Encrypt,revanced-vote:ReVanced Vote,revanced-invoice:ReVanced Invoice,revanced-manager-downloaders-template:ReVanced Manager Downloaders Template,revanced-branding:ReVanced Branding +IGNORED_CONTRIBUTORS=semantic-release-bot,revanced-bot,dependabot[bot],github-actions[bot],pre-commit-ci[bot] + API_VERSION=5 diff --git a/src/config.ts b/src/config.ts index 66af8ce8..30a98407 100644 --- a/src/config.ts +++ b/src/config.ts @@ -16,6 +16,7 @@ export interface Config { downloadersAssetRegex: RegExp; }; contributorRepos: { repo: string; name: string }[]; + ignoredContributors: string[]; apiVersion: string; } @@ -42,6 +43,7 @@ export function getConfig(env: Env): Config { const [repo, ...nameParts] = entry.trim().split(':'); return { repo: repo.trim(), name: nameParts.join(':').trim() }; }), + ignoredContributors: env.IGNORED_CONTRIBUTORS.split(",").map((entry) => entry.trim()), apiVersion: env.API_VERSION }); } diff --git a/src/services/contributors.ts b/src/services/contributors.ts index 2459d6ba..a453c172 100644 --- a/src/services/contributors.ts +++ b/src/services/contributors.ts @@ -1,11 +1,9 @@ import { getBackend, getConfig } from '../config'; import type { Env } from '../types'; -const botNames = ['semantic-release-bot', 'revanced-bot', 'dependabot[bot]', 'github-actions[bot]', 'pre-commit-ci[bot]']; - export async function getContributors(env: Env) { const backend = getBackend(env); - const { organization, contributorRepos } = getConfig(env); + const { organization, contributorRepos, ignoredContributors } = getConfig(env); const results = await Promise.all( contributorRepos.map(async ({ repo, name }) => { @@ -14,7 +12,7 @@ export async function getContributors(env: Env) { name, url: backend.repositoryUrl(organization, repo), contributors: contributors - .filter((contributor) => !botNames.includes(contributor.name)) + .filter((contributor) => !ignoredContributors.includes(contributor.name)) .map((contributor) => ({ name: contributor.name, avatar_url: contributor.avatarUrl, diff --git a/src/types.ts b/src/types.ts index e0052e08..5afccbde 100644 --- a/src/types.ts +++ b/src/types.ts @@ -18,5 +18,6 @@ export interface Env { MANAGER_DOWNLOADERS_ASSET_REGEX: string; PATCHES_PUBLIC_KEY_FILE: string; CONTRIBUTORS_REPOS: string; + IGNORED_CONTRIBUTORS: string; API_VERSION: string; }