Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
feat(workflows): cap open issues and claims at five per contributor (#2761)
DavdGaodbc6fc24fd4a
diff --git a/.github/workflows/issue-claim.yml b/.github/workflows/issue-claim.ymlindex 37cbbefe0..b9851d785 100644--- a/.github/workflows/issue-claim.yml+++ b/.github/workflows/issue-claim.yml@@ -15,6 +15,7 @@ permissions: {}env:TRIAGE_MODEL: qwen3.8-maxCLAIM_DAYS: '14'+ MAX_CLAIMS: '5'MAINTAINERS: DavdGao qbc2016jobs:@@ -157,6 +158,23 @@ jobs:return;}+ // Spread thin, nothing gets finished. A maintainer's load is+ // their own business.+ if (!maintainers.includes(who)) {+ const mine = (await github.paginate(+ github.rest.issues.listForRepo,+ { owner, repo, assignee: who, state: 'open', per_page: 100 },+ )).filter((i) => !i.pull_request);+ if (mine.length >= Number(process.env.MAX_CLAIMS)) {+ await say(+ `Thanks for offering, @${who}. To keep the work focused, ` ++ 'please concentrate on the issues you already hold first: ' ++ mine.map((i) => `#${i.number}`).join(', ') + '.',+ );+ return;+ }+ }+if (holders.length > 0) {// A claim the maintainers hold is theirs for as long as they// want it.diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.ymlindex a1a7e8531..34bd262d5 100644--- a/.github/workflows/issue-triage.yml+++ b/.github/workflows/issue-triage.yml@@ -4,18 +4,74 @@ name: Issue Triage# claim holds on current main. It only ever writes a verdict to a file: the# labelling and commenting below are what touch the issue, so the agent — which# reads attacker-controlled text — never holds a token that could.+#+# Before any of that, one account may hold at most MAX_OPEN_ISSUES open issues,+# so a burst of reports from one person cannot crowd everyone else out.on:issues:- types: [opened]+ types: [opened, reopened]permissions: {}env:TRIAGE_MODEL: qwen3.8-max+ MAX_OPEN_ISSUES: '5'+ MAINTAINERS: DavdGao qbc2016jobs:+ quota:+ permissions:+ issues: write+ runs-on: ubuntu-latest+ timeout-minutes: 5+ outputs:+ closed: ${{ steps.check.outputs.closed }}+ steps:+ - id: check+ uses: actions/github-script@v7+ with:+ script: |+ const { owner, repo } = context.repo;+ const issue_number = context.payload.issue.number;+ const author = context.payload.issue.user.login;+ const limit = Number(process.env.MAX_OPEN_ISSUES);+ const maintainers = process.env.MAINTAINERS.split(/\s+/);++ // A maintainer's own issues, and a reopen a maintainer decided+ // on, are never subject to the cap.+ if ([author, context.actor].some((u) => maintainers.includes(u))) {+ return;+ }++ // The REST listing is live; the search index lags behind and+ // would miss an issue opened seconds ago.+ const open = await github.paginate(+ github.rest.issues.listForRepo,+ { owner, repo, creator: author, state: 'open', per_page: 100 },+ );+ const others = open.filter(+ (i) => !i.pull_request && i.number !== issue_number,+ );+ if (others.length < limit) return;++ await github.rest.issues.createComment({+ owner, repo, issue_number,+ body:+ `Thanks for the report, @${author}. To keep the tracker ` ++ `focused, each account can have at most ${limit} open ` ++ 'issues at a time, so this one is closed for now. Once your ' ++ 'open issues are resolved, feel free to reopen it.',+ });+ await github.rest.issues.update({+ owner, repo, issue_number, state: 'closed',+ state_reason: 'not_planned',+ });+ core.setOutput('closed', 'true');+ core.notice(`Closed: ${author} already has ${others.length} open.`);+triage:+ needs: quota# Read the code, label and comment on the issue. Never contents:write — a# run that reads an untrusted issue must not be able to push.permissions:@@ -25,6 +81,8 @@ jobs:# blank issues are disabled and the bug form is the only template, so every# issue arrives here and stage 1 decides what it really is.if: >-+ github.event.action == 'opened' &&+ needs.quota.outputs.closed != 'true' &&github.event.issue.user.login != 'DavdGao' &&github.event.issue.user.login != 'qbc2016'runs-on: ubuntu-latestdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex f03ed6243..7656cca9d 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -92,6 +92,10 @@ Before writing code, find or open the issue that frames your work.your proposed solution, and any design alternatives. Wait for feedbackfrom the core team before starting a non-trivial implementation — thisavoids wasted rewrites.+- **One thing at a time.** Each contributor can have at most 5 open issues+ and hold at most 5 claimed issues at once. Beyond that, a new issue is+ closed and a new claim is declined automatically, so please see the ones+ you already have through first.### Step 2. Fork the repo and create a development branchdiff --git a/CONTRIBUTING_zh.md b/CONTRIBUTING_zh.mdindex 57dfa7ad0..158cc78e3 100644--- a/CONTRIBUTING_zh.md+++ b/CONTRIBUTING_zh.md@@ -49,6 +49,7 @@ AgentScope 欢迎使用 AI 编码助手的贡献者——Claude Code、Cursor、- **基于已有任务**:浏览 [Projects](https://github.com/orgs/agentscope-ai/projects/2) 与 [Issues](https://github.com/agentscope-ai/agentscope/issues) 中标有 `help wanted` 的条目(参见 [§1](#1-开发路线图与参与方式)),在 issue 下评论认领后再开始。- **提出新想法**:新建 issue 描述问题、方案与设计上的取舍。等待核心开发团队反馈后再开始实现,避免事后大规模返工。+- **数量限制**:每位贡献者同时最多有 5 个 open 状态的 issue,最多同时认领 5 个 issue。超出后新提的 issue 会被自动关闭、新的认领会被拒绝,请先聚焦手头已有的。### 第 2 步:Fork 仓库并创建开发分支