Skip to content

The agent engineering platform.

ci: allow bot bypass (#35762)

Mason Daugherty70cd1bd351da
diff --git a/.github/workflows/tag-external-contributions.yml b/.github/workflows/tag-external-contributions.yml
index 362d2cfc8c..59818b3082 100644
--- a/.github/workflows/tag-external-contributions.yml
+++ b/.github/workflows/tag-external-contributions.yml
@@ -68,6 +68,15 @@ jobs:
const { owner, repo } = context.repo;
const author = context.payload.sender.login;
+ // GitHub App bots (e.g. model-profile-bot) are not org members
+ // but should be treated as internal — skip the membership check.
+ const senderType = context.payload.sender.type;
+ if (senderType === 'Bot') {
+ console.log(`Sender ${author} is a Bot — treating as internal`);
+ core.setOutput('is-external', 'false');
+ return;
+ }
+
try {
// Check if the author is a member of the langchain-ai organization
// This requires org:read permissions to see private memberships
@@ -267,9 +276,16 @@ jobs:
// Cache: author -> { isExternal, mergedCount }
const contributorCache = new Map();
- async function getContributorInfo(author) {
+ async function getContributorInfo(author, userType) {
if (contributorCache.has(author)) return contributorCache.get(author);
+ // Bots are always internal
+ if (userType === 'Bot') {
+ const info = { isExternal: false, mergedCount: 0 };
+ contributorCache.set(author, info);
+ return info;
+ }
+
let isExternal = true;
try {
const membership = await github.rest.orgs.getMembershipForUser({
@@ -341,7 +357,7 @@ jobs:
for (const pr of prs) {
if (processed >= maxItems) break;
const author = pr.user.login;
- const info = await getContributorInfo(author);
+ const info = await getContributorInfo(author, pr.user.type);
const labels = [];
labels.push(info.isExternal ? 'external' : 'internal');
@@ -383,7 +399,7 @@ jobs:
if (issue.pull_request) continue;
const author = issue.user.login;
- const info = await getContributorInfo(author);
+ const info = await getContributorInfo(author, issue.user.type);
const labels = [];
labels.push(info.isExternal ? 'external' : 'internal');