the much simpler Domain Validation.
pr.json - name: Categorize PR with Claude uses: anthropics/claude-code-action@v1 with: prompt: | Read pr.json to get the PR title. Categorize the PR into exactly ONE of: new-feature, bug-fix, documentation. Write only the category (nothing else) to category.txt. # Only allow Claude to read from, and write to specific files claude_args: "--allowedTools 'Read(./pr.json),Edit(./category.txt)'" anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - name: Read category id: category # Don't trust and validate Claude output run: | read -r CATEGORY "$GITHUB_OUTPUT" else echo "::error::Unexpected category" exit 1 fi - name: Apply label env: PR_NUMBER: ${{ github.event.pull_request.number }} # Only inject the GitHub access token in the step that requires it GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use an environment variable to securely interpolate untrusted data # coming from Claude's output CATEGORY: ${{ steps.category.outputs.value }} run: gh pr edit "$PR_NUMBER" --add-label "kind/$CATEGORY""
,推荐阅读新收录的资料获取更多信息
记忆技巧:找「更大」→ 弹掉 ≤ 当前的(栈顶保留比当前大的);找「更小」→ 弹掉 ≥ 当前的;找「相等可接受」→ 用 < / ,否则用 <= / =。,这一点在新收录的资料中也有详细论述
從每隔一小時就會掉下一根鐵針的蠟燭,到英國工業革命時期的「敲窗員」,歷史上人們想出了各種巧妙方法,確保能準時起床。,详情可参考新收录的资料
// Every other path now has an explicit common prefix: