mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-07 05:15:09 -05:00
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.
This commit is contained in:
14
.github/workflows/cla-label-sync.yml
vendored
14
.github/workflows/cla-label-sync.yml
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user