From f6324f242adb3eed6153f0714901b37541b08ea2 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Mon, 28 Sep 2026 22:15:36 -0700 Subject: [PATCH] chore(ci): stop auto-filing community PRs onto the project board (#23796) Removes the Track Community PRs workflow. Community pull requests will no longer be added to project stablyai/13 automatically. --- .github/workflows/homebrew-bump.yml | 9 +- .github/workflows/track-community-prs.yaml | 120 --------------------- 2 files changed, 4 insertions(+), 125 deletions(-) delete mode 100644 .github/workflows/track-community-prs.yaml diff --git a/.github/workflows/homebrew-bump.yml b/.github/workflows/homebrew-bump.yml index 9b04d3205fc..a5f9b352f6e 100644 --- a/.github/workflows/homebrew-bump.yml +++ b/.github/workflows/homebrew-bump.yml @@ -132,11 +132,10 @@ jobs: print(src) PY - # Why: reuse the existing buf0-bot GitHub App (also used by - # track-community-prs.yaml) instead of minting a new PAT. The app is - # installed org-wide, so it has access to stablyai/homebrew-orca - # automatically. GITHUB_TOKEN cannot push cross-repo; a short-lived - # installation token can. + # Why: reuse the existing buf0-bot GitHub App instead of minting a new + # PAT. The app is installed org-wide, so it has access to + # stablyai/homebrew-orca automatically. GITHUB_TOKEN cannot push + # cross-repo; a short-lived installation token can. - name: Generate buf0-bot token id: app-token uses: actions/create-github-app-token@v3 diff --git a/.github/workflows/track-community-prs.yaml b/.github/workflows/track-community-prs.yaml deleted file mode 100644 index 7a588663fb2..00000000000 --- a/.github/workflows/track-community-prs.yaml +++ /dev/null @@ -1,120 +0,0 @@ -name: Track Community PRs - -on: - pull_request_target: - types: [opened, reopened, ready_for_review] - workflow_dispatch: - inputs: - pr_number: - description: 'PR number to backfill or retry' - required: true - type: number - -permissions: - contents: read - -jobs: - track-community-pr: - # API-only bookkeeping fits the free single-CPU container runner. - runs-on: ubuntu-slim - timeout-minutes: 5 - steps: - - name: Generate bufo-bot token - id: app-token - uses: actions/create-github-app-token@v3 - with: - app-id: 2590194 - private-key: ${{ secrets.BUFO_BOT_PRIVATE_KEY }} - owner: stablyai - - - name: Add PR to project - uses: actions/github-script@v8 - env: - PROJECT_OWNER: stablyai - PROJECT_NUMBER: '13' - INTERNAL_TEAM_SLUG: stably-eng - with: - github-token: ${{ steps.app-token.outputs.token }} - script: | - const projectOwner = process.env.PROJECT_OWNER; - const projectNumber = Number(process.env.PROJECT_NUMBER); - const internalTeamSlug = process.env.INTERNAL_TEAM_SLUG; - const owner = context.repo.owner; - const repo = context.repo.repo; - - const prNumber = context.eventName === 'workflow_dispatch' - ? Number(context.payload.inputs.pr_number) - : context.payload.pull_request.number; - - const { data: pr } = await github.rest.pulls.get({ - owner, - repo, - pull_number: prNumber, - }); - - const author = pr.user.login; - - const skippedAuthors = new Set([ - 'github-actions[bot]', - 'dependabot[bot]', - ]); - - if (skippedAuthors.has(author)) { - core.info(`Skipping bot PR author ${author}.`); - return; - } - - let isInternalAuthor = false; - try { - const membership = await github.rest.teams.getMembershipForUserInOrg({ - org: projectOwner, - team_slug: internalTeamSlug, - username: author, - }); - isInternalAuthor = membership.data.state === 'active'; - } catch (error) { - if (error.status !== 404) { - throw error; - } - } - - if (isInternalAuthor) { - core.info(`Skipping internal PR author ${author}.`); - return; - } - - const projectResult = await github.graphql( - ` - query($owner: String!, $number: Int!) { - organization(login: $owner) { - projectV2(number: $number) { - id - } - } - } - `, - { owner: projectOwner, number: projectNumber }, - ); - - const projectId = projectResult.organization.projectV2.id; - - await github.graphql( - ` - mutation($projectId: ID!, $contentId: ID!) { - addProjectV2ItemById(input: { - projectId: $projectId, - contentId: $contentId - }) { - item { - id - } - } - } - `, - { - projectId, - contentId: pr.node_id, - }, - ); - - core.info(`Added PR #${pr.number} (${pr.html_url}) to project ${projectOwner}/${projectNumber}.`);