-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade claude-code-action to v1, add anti-pile-on controls #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,15 +32,15 @@ jobs: | |
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
|
|
||
| - name: Install python tools | ||
| run: | | ||
| uv sync | ||
|
|
||
| - name: Run Claude Code | ||
| id: claude | ||
| uses: anthropics/claude-code-action@beta | ||
| uses: anthropics/claude-code-action@v1 | ||
|
|
||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| mcp_config: | | ||
|
|
@@ -51,40 +51,9 @@ jobs: | |
| "args": [ | ||
| "ols-mcp" | ||
| ] | ||
| }, | ||
| "sequential-thinking": { | ||
| "command": "npx", | ||
| "args": [ | ||
| "-y", | ||
| "@modelcontextprotocol/server-sequential-thinking" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # This is an optional setting that allows Claude to read CI results on PRs | ||
| additional_permissions: | | ||
| actions: read | ||
|
|
||
| # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4.1) | ||
| # model: "claude-opus-4-1-20250805" | ||
|
|
||
| # Optional: Customize the trigger phrase (default: @claude) | ||
| # trigger_phrase: "/claude" | ||
|
|
||
| # Optional: Trigger when specific user is assigned to an issue | ||
| # assignee_trigger: "claude-bot" | ||
|
|
||
| # Optional: Allow Claude to run specific commands | ||
| allowed_tools: "Bash(*),FileEdit,Edit,MultiEdit,WebSearch,WebFetch,mcp__ols_mcp__search_all_ontologies,mcp__ols_mcp__get_terms_from_ontology" | ||
|
|
||
| # Optional: Add custom instructions for Claude to customize its behavior for your project | ||
| # custom_instructions: | | ||
| # Follow our coding standards | ||
| # Ensure all new code has tests | ||
| # Use TypeScript for new files | ||
|
|
||
| # Optional: Custom environment variables for Claude | ||
| # claude_env: | | ||
| # NODE_ENV: test | ||
|
|
||
| claude_args: | | ||
| --permission-mode bypassPermissions | ||
|
Comment on lines
+58
to
+59
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,89 @@ | ||||||||||
| # This action invokes claude to review a PR. | ||||||||||
| # This is a generic action - you can customize, or delete in favor of the ontology review PR. | ||||||||||
| # -- | ||||||||||
| # This github action is from the copier template in https://github.com/ai4curation/github-ai-integrations, donated by the Monarch Initiative | ||||||||||
| # For more documentation, see https://ai4curation.github.io/aidocs/how-tos/set-up-github-actions/ | ||||||||||
| # Author: Chris Mungall (@cmungall) | ||||||||||
| name: Claude Code Ontology Review | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| pull_request: | ||||||||||
| types: [opened, synchronize] | ||||||||||
| paths: | ||||||||||
| - "src/ontology" | ||||||||||
|
|
||||||||||
| concurrency: | ||||||||||
| group: claude-ontology-review-${{ github.event.pull_request.number }} | ||||||||||
| cancel-in-progress: true | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| claude-review: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| contents: read | ||||||||||
| pull-requests: write | ||||||||||
| issues: read | ||||||||||
| id-token: write | ||||||||||
|
|
||||||||||
| steps: | ||||||||||
| - name: Checkout repository | ||||||||||
| uses: actions/checkout@v4 | ||||||||||
| with: | ||||||||||
| fetch-depth: 1 | ||||||||||
|
|
||||||||||
| - name: Run Claude Code Ontology Review | ||||||||||
| id: claude-review | ||||||||||
| uses: anthropics/claude-code-action@v1 | ||||||||||
| with: | ||||||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||||
|
|
||||||||||
| # Use Opus for ontology review (needs deeper reasoning) | ||||||||||
|
||||||||||
| # Use Opus for ontology review (needs deeper reasoning) | |
| # Use a newer Opus model for ontology review (needs deeper reasoning). | |
| # Note: Other workflow templates may reference an earlier model (e.g. "claude-opus-4-20250514"); | |
| # this workflow intentionally uses a newer version, but you can change it to match your standard if preferred. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prompt in the repo's workflow file has been customized to include "Whether template files are consistent with the repo's own workflow files" which is specific to this repository's purpose (providing templates). However, this same prompt is removed from the template version (template/.github/workflows/claude-code-review.yml), which is appropriate. The template version has fewer review criteria (missing "Performance considerations" and "Security concerns"). Consider whether these criteria should be restored in the template to provide more comprehensive code review guidance to users adopting this template.