-
Notifications
You must be signed in to change notification settings - Fork 0
ai integrations #11
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
ai integrations #11
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 |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "mcpServers": { | ||
| "ols-mcp": { | ||
| "type": "stdio", | ||
| "command": "uvx", | ||
| "args": [ | ||
| "ols-mcp" | ||
| ], | ||
| "env": {} | ||
| }, | ||
| "pubmed": { | ||
| "type": "http", | ||
| "url": "https://pubmed.mcp.claude.com/mcp" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(*)", | ||
| "Edit", | ||
| "MultiEdit", | ||
| "NotebookEdit", | ||
| "FileEdit", | ||
| "WebFetch", | ||
| "WebSearch", | ||
| "Write" | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,10 +7,13 @@ inputs: | |
| required: true | ||
| anthropic_api_key: | ||
| description: "Anthropic API key" | ||
| required: true | ||
| required: false | ||
| cborg_api_key: | ||
| description: "CBORG API key" | ||
| required: true | ||
| required: false | ||
| claude_code_oauth_token: | ||
| description: "Claude Code OAuth token" | ||
| required: false | ||
| prompt: | ||
| description: "The prompt to send to Claude Code" | ||
| required: false | ||
|
|
@@ -90,6 +93,7 @@ runs: | |
| shell: bash | ||
| id: prepare_prompt | ||
| run: | | ||
|
|
||
| # Check if either prompt or prompt_file is provided | ||
| if [ -z "${{ inputs.prompt }}" ] && [ -z "${{ inputs.prompt_file }}" ]; then | ||
| echo "::error::Neither 'prompt' nor 'prompt_file' was provided. At least one is required." | ||
|
|
@@ -125,6 +129,14 @@ runs: | |
| shell: bash | ||
| id: run_claude | ||
| run: | | ||
|
|
||
| if [ ! -z "${{ inputs.claude_code_oauth_token }}" ]; then | ||
| echo CLAUDE AUTH TOKEN IS NOT SET | ||
| else | ||
| echo CLAUDE AUTH TOKEN IS SET | ||
| export ANTHROPIC_API_KEY= | ||
| fi | ||
|
|
||
| ALLOWED_TOOLS_ARG="" | ||
| if [ ! -z "${{ inputs.allowed_tools }}" ]; then | ||
| ALLOWED_TOOLS_ARG="--allowedTools ${{ inputs.allowed_tools }}" | ||
|
|
@@ -135,15 +147,15 @@ runs: | |
|
|
||
| if [ -z "${{ inputs.output_file }}" ]; then | ||
| # Run Claude Code and output to console | ||
| timeout $timeout_seconds claude \ | ||
| claude \ | ||
|
||
| -p \ | ||
| --verbose \ | ||
| --output-format stream-json \ | ||
| "$(cat ${{ env.PROMPT_PATH }})" \ | ||
| ${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }} | ||
| else | ||
| # Run Claude Code and tee output to console and file | ||
| timeout $timeout_seconds claude \ | ||
| claude \ | ||
|
||
| -p \ | ||
| --verbose \ | ||
| --output-format stream-json \ | ||
|
|
@@ -160,8 +172,9 @@ runs: | |
| fi | ||
|
|
||
| env: | ||
| ANTHROPIC_API_KEY: "." | ||
| ANTHROPIC_AUTH_TOKEN: ${{ inputs.cborg_api_key }} | ||
| ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }} | ||
| # ANTHROPIC_AUTH_TOKEN: ${{ inputs.cborg_api_key }} | ||
| CLAUDE_CODE_OAUTH_TOKEN: ${{ inputs.claude_code_oauth_token }} | ||
|
Comment on lines
+175
to
+177
|
||
| GITHUB_TOKEN: ${{ inputs.github_token }} | ||
| ANTHROPIC_BASE_URL: "https://api.cborg.lbl.gov" | ||
| DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1" | ||
| # ANTHROPIC_BASE_URL: "https://api.cborg.lbl.gov" | ||
| # DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1" | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||||||||||
| # CLAUDE.md for | ||||||||||||||
|
|
||||||||||||||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||||||||||||||
|
Comment on lines
+1
to
+3
|
||||||||||||||
| # CLAUDE.md for | |
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | |
| # Copilot Instructions | |
| This file provides guidance to GitHub Copilot when working with code in this repository. |
Copilot
AI
Dec 13, 2025
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 file provides guidance for "Claude Code" but is placed in a file specifically named for GitHub Copilot instructions. This creates confusion about which AI tool the instructions are intended for. Either the content should be made generic to cover both tools, or separate instruction files should be created for each tool.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| name: Claude Code Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize] | ||
| # Optional: Only run on specific file changes | ||
| # paths: | ||
| # - "src/**/*.ts" | ||
| # - "src/**/*.tsx" | ||
| # - "src/**/*.js" | ||
| # - "src/**/*.jsx" | ||
|
|
||
| jobs: | ||
| claude-review: | ||
| # Optional: Filter by PR author | ||
| # if: | | ||
| # github.event.pull_request.user.login == 'external-contributor' || | ||
| # github.event.pull_request.user.login == 'new-developer' || | ||
| # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Run Claude Code Review | ||
| id: claude-review | ||
| uses: anthropics/claude-code-action@beta | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
|
|
||
| # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) | ||
| # model: "claude-opus-4-20250514" | ||
|
|
||
| # Direct prompt for automated review (no @claude mention needed) | ||
| direct_prompt: | | ||
| Please review this pull request and provide feedback on: | ||
| - Code quality and best practices | ||
| - Potential bugs or issues | ||
| - Performance considerations | ||
| - Security concerns | ||
| - Test coverage | ||
| Be constructive and helpful in your feedback. | ||
| # Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR | ||
| # use_sticky_comment: true | ||
|
|
||
| # Optional: Customize review based on file types | ||
| # direct_prompt: | | ||
| # Review this PR focusing on: | ||
| # - For TypeScript files: Type safety and proper interface usage | ||
| # - For API endpoints: Security, input validation, and error handling | ||
| # - For React components: Performance, accessibility, and best practices | ||
| # - For tests: Coverage, edge cases, and test quality | ||
|
|
||
| # Optional: Different prompts for different authors | ||
| # direct_prompt: | | ||
| # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && | ||
| # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || | ||
| # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} | ||
|
|
||
| # Optional: Add specific tools for running tests or linting | ||
| # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" | ||
|
|
||
| # Optional: Skip review for certain conditions | ||
| # if: | | ||
| # !contains(github.event.pull_request.title, '[skip-review]') && | ||
| # !contains(github.event.pull_request.title, '[WIP]') | ||
|
|
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||
| name: Claude Issue summarize | ||||
| description: "Automatically summarize GitHub issues using Claude Code" | ||||
|
||||
| description: "Automatically summarize GitHub issues using Claude Code" |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||
| name: Claude Issue Triage | ||||
| description: "Automatically triage GitHub issues using Claude Code" | ||||
|
||||
| description: "Automatically triage GitHub issues using Claude Code" |
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 logic in this conditional check is inverted. The condition checks if the token is NOT empty (! -z means "not zero length"), but then echoes "IS NOT SET". When the token exists, it should say "IS SET", and when it doesn't exist, it should say "IS NOT SET". Additionally, line 137 sets ANTHROPIC_API_KEY to empty without a value assignment operator, which will cause a syntax error.