Astro.request.headers access when configure allowedDomains for prerendered pages #5280
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Issue Triage | |
| on: | |
| issues: | |
| types: [opened, reopened] | |
| issue_comment: | |
| types: [created] | |
| permissions: {} | |
| env: | |
| PNPM_STORE_DIR: .pnpm-store | |
| concurrency: | |
| # Only one triage run per issue at a time. New runs queue (not cancel) | |
| # to avoid killing in-flight runs when the bot posts its own comment. | |
| group: issue-triage-${{ github.event.issue.number }} | |
| cancel-in-progress: false | |
| jobs: | |
| label: | |
| if: >- | |
| !github.event.issue.pull_request && | |
| (github.event.action == 'opened' || github.event.action == 'reopened') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write # Add "needs triage" label | |
| steps: | |
| - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| github.rest.issues.addLabels({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| labels: ["needs triage"] | |
| }) | |
| triage: | |
| # 1. Skip issues with "auto triage skipped" label | |
| # 2. Skip pull requests (issues only) | |
| # 3. One of these conditions must be met: | |
| # 3a. Issue was just created | |
| # 3b. Issue comment was just created, and "needs triage" label exists | |
| if: >- | |
| !contains(github.event.issue.labels.*.name, 'auto triage skipped') && | |
| !github.event.issue.pull_request && | |
| ((github.event.action == 'opened') || | |
| (github.event.action == 'created' && contains(github.event.issue.labels.*.name, 'needs triage'))) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| permissions: | |
| contents: read # Read repo (push uses FREDKBOT_GITHUB_TOKEN) | |
| issues: read # Read issue details for triage | |
| id-token: write # OIDC auth for pkg.pr.new preview releases | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| # Do not persist the default GITHUB_TOKEN as a git credential. | |
| # checkout sets an http.extraheader that overrides any credentials | |
| # embedded in push URLs, including the FREDKBOT_GITHUB_TOKEN used | |
| # by gitPush(). With persist-credentials enabled, git always | |
| # authenticates as github-actions[bot] (read-only), causing pushes | |
| # to fail with 403. | |
| persist-credentials: false | |
| - name: Configure Git identity | |
| run: | | |
| git config user.name "astrobot-houston" | |
| git config user.email "fred+astrobot@astro.build" | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| - name: Setup Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24.15.0 | |
| cache: pnpm | |
| - name: Install agent CLIs (bgproc, agent-browser) | |
| run: | | |
| npm install -g bgproc agent-browser | |
| agent-browser install | |
| - name: Clone Astro Compiler (for debugging) | |
| run: git clone --depth 1 https://github.com/withastro/compiler.git .compiler | |
| - name: Install deps | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Checkout fix branch | |
| run: git checkout -B "flue/fix-${{ github.event.issue.number }}" | |
| - name: Run triage agent | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| FREDKBOT_GITHUB_TOKEN: ${{ secrets.FREDKBOT_GITHUB_TOKEN }} | |
| ANTHROPIC_API_KEY: ${{ secrets.CI_ANTHROPIC_API_KEY }} | |
| ISSUE_NUMBER: ${{ github.event.issue.number }} | |
| run: | | |
| pnpm exec flue run issue-triage \ | |
| --target node \ | |
| --payload "{\"issueNumber\": $ISSUE_NUMBER}" |