[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ACS6QS9D2YVRSQQEW28X54":3,"skill-same:01M6ACS6QS9D2YVRSQQEW28X54":95},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":7,"updatedAt":46,"install":47,"resources":60},"01M6ACS6QS9D2YVRSQQEW28X54","sweep-open-prs","批量清理开放 PR",null,"","apache\u002Finfrastructure-actions","apache","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47359?v=4","01M6AC83E6K4FDKK7HZ8WNMQKE","The Apache Software Foundation","01M6ACS2MWS91DE8X1SQKEH2S2",34,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fapache\u002Finfrastructure-actions\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsweep-open-prs\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理","SCENARIO","使用场景",[30,31,32,33],"sweep open prs","open","sweep","prs","2026-11-10 10:12:30",false,"\u003C!--\n   Licensed to the Apache Software Foundation (ASF) under one\n   or more contributor license agreements.  See the NOTICE file\n   distributed with this work for additional information\n   regarding copyright ownership.  The ASF licenses this file\n   to you under the Apache License, Version 2.0 (the\n   \"License\"); you may not use this file except in compliance\n   with the License.  You may obtain a copy of the License at\n\n     http:\u002F\u002Fwww.apache.org\u002Flicenses\u002FLICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing,\n   software distributed under the License is distributed on an\n   \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n   KIND, either express or implied.  See the License for the\n   specific language governing permissions and limitations\n   under the License.\n-->\n\n---\nname: sweep-open-prs\ndescription: Use when the maintainer asks what can be landed across the open PR queue - \"check if I can merge any PRs\", \"which PRs can be approved and merged\", \"sweep the PRs\", \"what's ready to land\", \"anything new on the PRs\". Also for a routine pass over the queue after an overnight dependabot batch. Not for a deep review of one named PR.\n---\n\n# Sweep the open PR queue\n\nAnswer \"what can I land right now?\" for every open PR in one pass, then act\nonly on what the maintainer confirms.\n\nThe queue is mostly dependabot: allowlist bumps under\n`.github\u002Factions\u002Ffor-dependabot-triggered-reviews\u002F`, plus workflow and\n`uv.lock` bumps. A sweep is cheap because two `gh` calls cover the whole\nqueue; the expensive part is reviewing whatever the sweep surfaces as red or\nas needing a human read.\n\n## Environment\n\n`gh` reads its config and auth keyring from `~\u002F.config\u002Fgh` and needs\napi.github.com, so it does not work inside the sandbox. The usual setup\nexcludes it with `sandbox.excludedCommands: [\"gh *\"]`, and then every `gh`\ncall runs unsandboxed with no bypass needed. Without that exclusion, each call\nneeds `dangerouslyDisableSandbox: true`, and the first failure looks like this\n(it is not an auth problem):\n\n```\nfailed to load config: open \u002FUsers\u002F\u003Cuser>\u002F.config\u002Fgh\u002Fconfig.yml: operation not permitted\n```\n\n**The exclusion only matches a bare `gh` command.** A pipe, redirect, `;` or\n`&&` puts the whole command back in the sandbox, where it fails with\n`deny network-outbound api.github.com:443`, or with\n`tls: failed to verify certificate: x509: OSStatus -26276` once the host is\nallowed. Filter with `--jq` \u002F `--template` instead of piping, and read output\nfrom the tool result instead of redirecting it to a file. Keep the command on\none line too: a multi-line argument (a `--body` with newlines, a `\\`\ncontinuation) does not match the exclusion either, so pass long text with\n`--body-file`.\n\nTwo more traps, both of which produce a bogus `HTTP 401`:\n\n| Trap | Fix |\n|---|---|\n| Batching `gh` calls in a shell `for` loop | One `gh` call per Bash invocation |\n| `gh` invoked from a python\u002Fsh child process | Call `gh` directly from Bash |\n\n## Step 1: gather\n\nTwo calls cover the queue. Run them as written, each on a single line (see\nEnvironment) - the per-PR alternative burns a call per PR and hits the loop\ntrap above.\n\nState:\n\n```\ngh pr list --repo apache\u002Finfrastructure-actions --limit 50 --json number,title,author,isDraft,mergeable,mergeStateStatus,reviewDecision --jq '.[] | \"\\(.number)\\t@\\(.author.login)\\tmergeable=\\(.mergeable)\\tstate=\\(.mergeStateStatus)\\treview=\\(.reviewDecision)\\t\\(.title)\"'\n```\n\nChecks, collapsed to only what is NOT green:\n\n```\ngh pr list --repo apache\u002Finfrastructure-actions --limit 50 --json number,statusCheckRollup --jq '.[] | \"\\(.number)\\t\" + ([.statusCheckRollup[] | . as $c | (if ($c.status \u002F\u002F \"COMPLETED\") != \"COMPLETED\" then $c.status elif ($c.conclusion \u002F\u002F \"\") != \"\" then $c.conclusion elif ($c.state \u002F\u002F \"\") != \"\" then $c.state else \"PENDING\" end) as $s | select($s != \"SUCCESS\" and $s != \"NEUTRAL\" and $s != \"SKIPPED\") | \"\\($c.name \u002F\u002F $c.context)=\\($s)\"] | if length==0 then \"ALL GREEN\" else join(\" \") end)'\n```\n\n**Read `status` before `conclusion`.** A `CheckRun` carries `conclusion: null`\nuntil its `status` reaches `COMPLETED`, and its `state` is always null - `state`\nbelongs to the `StatusContext` shape instead. A query that reaches straight for\n`(.conclusion \u002F\u002F .state)` therefore prints a bare `name=` for every check still\nrunning, which reads like a finding rather than \"ask again in a minute\". The\nquery above reports `QUEUED` or `IN_PROGRESS` instead.\n\nTwo states that are *not* verdicts, and must be re-queried rather than\nclassified:\n\n- `mergeStateStatus: UNKNOWN` - GitHub is recomputing mergeability, usually\n  right after another PR merged. It also appears mid-merge-storm when several\n  PRs touch one file; the state settles back to `CLEAN` on its own.\n- A check reported `QUEUED` or `IN_PROGRESS` - not yet a result. Checks on a\n  fresh PR routinely take minutes, so a sweep run the moment a PR opens will\n  see them unfinished.\n\n## Step 2: classify\n\nBucket each PR on the observable fields alone:\n\n| Bucket | Signature | Action |\n|---|---|---|\n| **Merge now** | `state=CLEAN`, `review=APPROVED`, all green | Merge on confirmation |\n| **Approve + merge** | all green, `review=REVIEW_REQUIRED`, author is dependabot or another person | Review, then approve + merge |\n| **Needs triage** | any check not green | Read the failing job before judging |\n| **Blocked on reviewer** | all green, `review=REVIEW_REQUIRED`, **maintainer is the author** | Cannot self-approve - nudge, do not attempt |\n| **Blocked on author** | `review=CHANGES_REQUESTED` | Waiting on the bump or an upstream fix |\n| **Conflicting** | `mergeable=CONFLICTING` | Needs a rebase first |\n\nTwo rules that decide most of the queue:\n\n- **You cannot approve your own PR.** A maintainer-authored PR with\n  `review=REVIEW_REQUIRED` is never in an actionable bucket no matter how\n  green it is. Say so plainly rather than offering to approve it.\n- **`state=BLOCKED` with `review=REVIEW_REQUIRED` just means \"needs an\n  approval\"** - it is not a failure. `BLOCKED` alongside a red check is the\n  failure.\n\n## Step 3: act, per bucket\n\n### Allowlist bumps (`action-allowlist-review:` titles)\n\nThe `verify` check is the gate. Green `verify` means the tool reconciled the\npublished action against a rebuild from its own lock file.\n\n**REQUIRED SUB-SKILL:** for anything red, or for any bump you are about to\napprove on substance rather than on a green tick, use `analyze-action-pr`. It\nowns the failure taxonomy (pipe-to-shell, unverified download, in-tree\nbinaries, verify-script gaps) and the upstream-issue workflow.\n\nBefore treating a warning as a finding, **diff it against the approved\nversion**. A warning the already-approved version also carries is a standing\nproperty of the action, not a regression the bump introduced. Carried-over\nwarnings do not block.\n\n### Lock-file and workflow bumps\n\n`uv.lock` \u002F `package-lock.json` only, or a workflow action SHA bump: read the\ndiff, confirm it touches no action surface, approve.\n\n### Red checks\n\nRead the failing job before forming a view:\n\n```\ngh pr checks \u003CN> --repo apache\u002Finfrastructure-actions --json name,state,link --jq '.[] | select(.state==\"FAILURE\") | .link'\ngh run view --repo apache\u002Finfrastructure-actions --job \u003Cjob-id> --log-failed\n```\n\nRun each as its own Bash call, with no pipe (see Environment). The log keeps\nits ANSI colour escapes; read past them to the summary table.\n\n**A red check on a stale branch may be a fixed bug.** Before reporting a\nfinding, check whether the failure predates something already merged to main -\nrebase or re-run rather than filing against it.\n\n### Superseded PRs\n\nA bump held for an upstream defect is often replaced rather than fixed:\ndependabot opens a new PR at the newer version and closes the old one. Before\ndigging back into a held PR, check whether a higher-numbered PR for the same\naction already exists.\n\n## Reporting\n\nLead with what the maintainer can act on, not with the full queue. A table\nkeyed by bucket beats a PR-by-PR narrative once the queue is more than a\nhandful.\n\n**Draft every outbound message and wait for explicit confirmation** - reviews,\nPR comments, upstream issues. Approving is a message in the maintainer's name.\nMerging a PR they just approved in the same turn is the mid-flow exception.\n\n## Common mistakes\n\n| Mistake | Consequence |\n|---|---|\n| Reading `state=BLOCKED` as \"broken\" | Most of a healthy queue is `BLOCKED` pending one approval |\n| Classifying on a `mergeStateStatus: UNKNOWN` | Misses a PR that is actually ready; re-query first |\n| Reading an unfinished check as a failure | A running check has no conclusion yet; re-query rather than triaging it |\n| Offering to approve the maintainer's own PR | Impossible on GitHub; wastes a round-trip |\n| Treating a carried-over warning as a regression | Blocks a bump that is no worse than the approved version |\n| Filing upstream before searching the target repo | Duplicate issues; search existing issues, including the maintainer's own |\n| Looping `gh` over PR numbers | Spurious `HTTP 401` on every call after the first |\n| Piping or redirecting `gh` output | The command runs sandboxed and fails with a network deny or `x509` TLS error |\n",{},"main","2b603d78556b08d99fd7433c2dcfaabc7295a377",".agents\u002Fskills\u002Fsweep-open-prs",89,"https:\u002F\u002Fgithub.com\u002Fapache\u002Finfrastructure-actions","https:\u002F\u002Finfra.apache.org\u002F","https:\u002F\u002Fgithub.com\u002Fapache","https:\u002F\u002Fwww.apache.org\u002F","2026-11-14 21:47:32",{"source":9,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add apache\u002Finfrastructure-actions --skill sweep-open-prs",{"tool":53,"command":54},"bunx","bunx skills add apache\u002Finfrastructure-actions --skill sweep-open-prs",{"tool":56,"command":57},"pnpm","pnpm dlx skills add apache\u002Finfrastructure-actions --skill sweep-open-prs","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fapache\u002Finfrastructure-actions\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fsweep-open-prs\u002FSKILL.md",true,[61,67,71,75,79,83,87,91],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Factuator-protection.md","REFERENCE","参考文档",2061,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Factuator-protection.md",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fcsrf-cors-sessions-headers.md",3506,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Fcsrf-cors-sessions-headers.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fmethod-security.md",1435,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Fmethod-security.md",{"path":76,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Foauth2-resource-server-jwt.md",2969,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Foauth2-resource-server-jwt.md",{"path":80,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Foidc-login-oauth2-client.md",2070,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Foidc-login-oauth2-client.md",{"path":84,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fpassword-encoding.md",650,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Fpassword-encoding.md",{"path":88,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Freview-checklist.md",729,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Freview-checklist.md",{"path":92,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Ftesting-security.md",3918,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fspring-security\u002Freferences\u002Ftesting-security.md",[96],{"skillNo":97,"name":98,"nameZh":99,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":7,"sourceHtmlUrl":100,"categories":101,"keywords":104,"publishedAt":34},"01M6ACS4XBVZ7A89WQ91A31V1R","analyze-action-pr","GitHub Actions PR 分析","https:\u002F\u002Fgithub.com\u002Fapache\u002Finfrastructure-actions\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fanalyze-action-pr\u002FSKILL.md",[102,103],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[105,106,107,108],"pr","analyze action pr","analyze","action"]