Repository navigation
cherry-pick(release/v1.207): run a package with no project in the default project (#4630) #25223
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: Claude PR Review | |
| on: | |
| pull_request: | |
| types: [opened, ready_for_review] | |
| issue_comment: | |
| types: [created] | |
| pull_request_review_comment: | |
| types: [created] | |
| pull_request_review: | |
| types: [submitted] | |
| # Cancel outdated runs when new commits are pushed | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| claude-review: | |
| name: Claude Code Review | |
| runs-on: uipath-ubuntu-latest | |
| timeout-minutes: 15 | |
| # Only run on non-fork PRs (secrets required), or on @claude mentions from | |
| # trusted authors (OWNER/MEMBER/COLLABORATOR). Untrusted actors must not be | |
| # able to trigger a privileged run via a comment — see Layer 2 in the | |
| # prompt-injection hardening notes. | |
| if: | | |
| (github.event_name == 'pull_request' && !github.event.pull_request.draft && github.event.pull_request.head.repo.full_name == github.repository) || | |
| (github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '@claude') && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || | |
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') && github.event.pull_request.head.repo.full_name == github.repository && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) || | |
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') && github.event.pull_request.head.repo.full_name == github.repository && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.review.author_association)) | |
| # Least privilege. contents stays read (no push). pull-requests/issues:write | |
| # are required by track_progress to post and update the review comment. | |
| # actions:read dropped — this prompt never reads workflow-run data. | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Claude Code Action | |
| # Pinned to a full commit SHA (not @v1) so a moved tag cannot run | |
| # untrusted action code with our token/secrets. SHA = v1.0.250. | |
| uses: anthropics/claude-code-action@a26b07d8c778b0c43f64618e5fd29fd0f8af72e8 # v1.0.250 | |
| env: | |
| AWS_REGION: ${{ vars.AWS_REGION }} | |
| AWS_BEARER_TOKEN_BEDROCK: ${{ secrets.AWS_BEARER_TOKEN_BEDROCK }} | |
| with: | |
| use_bedrock: "true" | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| track_progress: true | |
| # Comment-source allowlist (public repo). Only comments authored by | |
| # these actors are passed to Claude as context; everyone else's | |
| # comments — including external contributors' — are ignored, closing | |
| # the "trusted user triggers @claude on a thread containing a planted | |
| # injection comment" vector. NOTE: this filters COMMENTS only; the PR | |
| # diff, changed-file contents, PR body and title are still ingested, | |
| # so this stacks on the tool allowlist below, it does not replace it. | |
| # Keep this list in sync with the global CODEOWNERS maintainers. | |
| include_comments_by_actor: "gabrielavaduva,AlvinStanescu,marius-bughiu,RaduAna-Maria,uipreliga,dmetzgar,rockymadden,gozhang2,smflorentino,bai-uipath,akshaylive" | |
| # Drop all bot comments (dependabot, renovate, etc.). Exclusion wins | |
| # over the include list if an actor somehow matches both. | |
| exclude_comments_by_actor: "*[bot]" | |
| # Tool allowlist (prompt-injection containment). This review reads | |
| # attacker-controlled content (diff, PR comments, file contents), so | |
| # Claude is restricted to read-only commands plus the single write | |
| # tool track_progress needs to post its review comment. Arbitrary | |
| # Bash, network tools (WebFetch/WebSearch/curl/wget), git push, and | |
| # `gh api`/`gh secret` are NOT in the list and therefore blocked — | |
| # an injected instruction cannot reach env secrets (GITHUB_TOKEN / | |
| # AWS_BEARER_TOKEN_BEDROCK are env vars, not files) or mutate the repo. | |
| # Residual: readable repo content could be echoed into the PR comment. | |
| claude_args: >- | |
| --model us.anthropic.claude-opus-5-5 | |
| --allowedTools "Read,Grep,Glob,Bash(git diff:*),Bash(gh pr view:*),Bash(ls:*),Bash(cat:*),mcp__github_comment__update_claude_comment" | |
| prompt: | | |
| You are reviewing a PR for a Claude Code plugin repository that contains | |
| markdown skill definitions, YAML frontmatter, shell hooks, and coder_eval | |
| test tasks. There is NO source code, build system, or runtime — only | |
| documentation that teaches AI agents how to build UiPath automations. | |
| ## Review steps | |
| 1. Read `.github/code_review.md` for the full review criteria and output format. | |
| 2. Read `CLAUDE.md` for project conventions. | |
| 3. Read `.claude/rules/skill-review.md` for the skill scoring framework. | |
| 4. Run `git diff origin/${{ github.base_ref }}...HEAD` to see the full diff. | |
| 5. Run `gh pr view ${{ github.event.pull_request.number || github.event.issue.number }} --comments` to read existing PR conversation — do not repeat resolved issues. | |
| 6. For each changed file, read the FULL file (not just the diff) for surrounding context. | |
| ## Skill-specific checks | |
| 7. If the PR adds a new skill folder under `skills/`: | |
| a. Check that `tests/tasks/<skill-name>/` exists with at least one `.yaml` task file. | |
| If missing, flag as **Medium** (most skills are not yet test-compliant). | |
| b. If tests exist, verify: | |
| - At least one task tagged `smoke` and at least one tagged `e2e` (both required). | |
| - Each task's `tags` uses only valid test types: `smoke`, `integration`, or `e2e`. | |
| - Each task's `tags` includes the skill directory name (e.g., `uipath-maestro-flow`) as the first tag. | |
| - `task_id` matches `skill-<domain>-<capability>`. | |
| - `success_criteria` has at least one check. | |
| If smoke or e2e coverage is missing, flag as **Medium**. | |
| 8. Check that `CODEOWNERS` includes an entry for any new skill path. | |
| 9. Verify all relative links in changed markdown files resolve to files that | |
| actually exist in the repo (use `ls` or `cat` to confirm). | |
| 10. Check for cross-skill references — skills under `skills/` must be fully | |
| self-contained with no imports or links to other skill folders. | |
| 11. Verify no secrets, tokens, API keys, or personal filesystem paths appear | |
| in any changed file. | |
| ## Output | |
| Follow the output format specified in `.github/code_review.md`. | |
| Always include the "What's Missing" section, even if empty. |