mirror of
https://github.com/langchain-ai/docs.git
synced 2026-07-20 00:46:14 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user