fix(ci): treat open-swe bot as internal contributor (#3914)

The `tag-external-contributions` workflow was incorrectly flagging PRs
authored by the `open-swe` bot as external contributions. Hardcode
`open-swe`, `app/open-swe`, and `open-swe[bot]` as internal authors so
the job skips the org-membership API call and labels them correctly.

## Changes
- Add `internalAuthors` `Set` with `open-swe` variants to the
`github-script` step in
`.github/workflows/tag-external-contributions.yml`
- Short-circuit the external-contributor check before the
`org.getMembershipForUser` call when the PR author matches any of the
hardcoded bot identities
This commit is contained in:
Mason Daugherty
2026-05-08 01:56:06 -04:00
committed by GitHub
parent f5407c96e5
commit 39c9b330c1
@@ -44,7 +44,17 @@ jobs:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const { owner, repo } = context.repo;
const author = context.payload.sender.login;
const sender = context.payload.sender;
const author = sender.login;
const internalBots = new Set([
'open-swe[bot]',
]);
if (sender.type === 'Bot' && internalBots.has(author)) {
console.log(`Bot ${author} is hardcoded as internal`);
core.setOutput('is-external', 'false');
return;
}
try {
// Check if the author is a member of the langchain-ai organization