Skip to content

Fixes #7957: Add distributed MCP invocation and concurrency quotas #694

Fixes #7957: Add distributed MCP invocation and concurrency quotas

Fixes #7957: Add distributed MCP invocation and concurrency quotas #694

# Licensed to the Apache Software Foundation (ASF) under one or more

Check warning on line 1 in .github/workflows/issue-spec-policy.yml

View workflow run for this annotation

GitHub Actions / IssueSpec Policy

Workflow execution policy warning (evaluate mode)

On December 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: IssueSpec Policy
# Only trusted default-branch code runs here. Candidate code is tested by ci.yml.
on:
pull_request_target:
branches: [master]
types: [opened, edited, synchronize, reopened, ready_for_review, labeled, unlabeled]
issues:
types: [edited, deleted, closed, reopened]
issue_comment:
types: [created, edited, deleted]
workflow_dispatch:
inputs:
pull_request:
description: Pull request number to re-evaluate
required: true
type: string
permissions: {}
jobs:
discover:
if: github.repository == 'apache/shenyu'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
pull-requests: read
outputs:
pull_requests: ${{ steps.targets.outputs.pull_requests }}
has_targets: ${{ steps.targets.outputs.has_targets }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- uses: actions/github-script@v7
id: targets
with:
script: |
const {discover} = require('./.github/scripts/issue-spec-policy.cjs');
await discover({github, context, core});
policy:
needs: discover
if: needs.discover.outputs.has_targets == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
issues: read
pull-requests: read
checks: write
strategy:
fail-fast: false
max-parallel: 4
matrix:
pull_request: ${{ fromJSON(needs.discover.outputs.pull_requests) }}
concurrency:
group: issue-spec-policy-${{ matrix.pull_request }}
cancel-in-progress: false
env:
PULL_REQUEST_NUMBER: ${{ matrix.pull_request }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- uses: actions/github-script@v7
id: prepare
with:
script: |
const {prepare} = require('./.github/scripts/issue-spec-policy.cjs');
await prepare({github, context, core, directory: process.env.RUNNER_TEMP,
number: Number(process.env.PULL_REQUEST_NUMBER)});
- uses: actions/setup-go@v5
if: steps.prepare.outputs.needs_cli == 'true'
with:
go-version: '1.25.0'
cache: false
- name: Build the pinned IssueSpec CLI
if: steps.prepare.outputs.needs_cli == 'true'
env:
ISSUE_SPEC_REVISION: ${{ steps.prepare.outputs.tool_revision }}
GOBIN: ${{ runner.temp }}/issue-spec-bin
run: go install "github.com/higress-group/issue-spec/cmd/issue-spec@${ISSUE_SPEC_REVISION}"
- name: Publish advisory policy result
if: always() && steps.prepare.outputs.prepared == 'true'
uses: actions/github-script@v7
env:
GH_TOKEN: ${{ github.token }}
with:
script: |
const {finish} = require('./.github/scripts/issue-spec-policy.cjs');
await finish({github, context, core, directory: process.env.RUNNER_TEMP,
number: Number(process.env.PULL_REQUEST_NUMBER),
binary: process.env.RUNNER_TEMP + '/issue-spec-bin/issue-spec'});