From 0f75c408f2eea7f1bce8cd0ccec5c6ca8ac55b7e Mon Sep 17 00:00:00 2001 From: Otto-AGPT Date: Fri, 6 Feb 2026 20:04:29 +0000 Subject: [PATCH] feat: only run CLA automation for PRs touching autogpt_platform/ CLA check still runs on all PRs (CLA-assistant config). But label automation, reminders, and auto-close only apply to platform code (Polyform Shield License). Uses simple first-page check (per_page: 100) - covers 99%+ of PRs. --- .github/workflows/cla-label-sync.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/cla-label-sync.yml b/.github/workflows/cla-label-sync.yml index 617e76f623..e452777024 100644 --- a/.github/workflows/cla-label-sync.yml +++ b/.github/workflows/cla-label-sync.yml @@ -229,6 +229,20 @@ jobs: continue; } + // Skip if PR doesn't touch platform code (CLA automation only for autogpt_platform/) + const PLATFORM_PATH = 'autogpt_platform/'; + const { data: files } = await github.rest.pulls.listFiles({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber, + per_page: 100 + }); + const touchesPlatform = files.some(f => f.filename.startsWith(PLATFORM_PATH)); + if (!touchesPlatform) { + console.log(`PR #${prNumber}: Skipping - doesn't touch ${PLATFORM_PATH}`); + continue; + } + const claStatus = await getClaStatus(pr.head.sha); const currentLabels = pr.labels.map(l => l.name); const hasPending = currentLabels.includes(LABEL_PENDING);