ba4be087d5
Create PR to main with cherry-pick from release / cherry-pick (push) Failing after 0s
CICD NeMo / pre-flight (push) Failing after 0s
CICD NeMo / configure (push) Has been skipped
Build, validate, and release Neural Modules / pre-flight (push) Failing after 1s
CICD NeMo / code-linting (push) Has been skipped
Build, validate, and release Neural Modules / release (push) Has been skipped
Build, validate, and release Neural Modules / release-summary (push) Has been cancelled
CICD NeMo / cicd-test-container-build (push) Has been cancelled
CICD NeMo / cicd-import-tests (push) Has been cancelled
CICD NeMo / L0_Setup_Test_Data_And_Models (push) Has been cancelled
CICD NeMo / cicd-main-unit-tests (push) Has been cancelled
CICD NeMo / cicd-main-speech (push) Has been cancelled
CICD NeMo / Nemo_CICD_Test (push) Has been cancelled
CICD NeMo / Coverage (e2e) (push) Has been cancelled
CICD NeMo / Coverage (unit-test) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
CICD NeMo / cicd-wait-in-queue (push) Has been cancelled
120 lines
4.0 KiB
YAML
120 lines
4.0 KiB
YAML
name: Claude Fix Issue
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
issues: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
authorize:
|
|
if: >-
|
|
!github.event.issue.pull_request &&
|
|
contains(github.event.comment.body, '/claude fix')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check team membership
|
|
uses: actions/github-script@v8
|
|
with:
|
|
github-token: ${{ secrets.ORG_TEAM_READ_TOKEN }}
|
|
script: |
|
|
const username = context.payload.comment.user.login;
|
|
try {
|
|
const res = await github.rest.teams.getMembershipForUserInOrg({
|
|
org: 'NVIDIA-NeMo',
|
|
team_slug: 'speech_team',
|
|
username,
|
|
});
|
|
if (res.data.state !== 'active') {
|
|
core.setFailed(`${username} is not an active member of NVIDIA Speech Team`);
|
|
}
|
|
} catch (e) {
|
|
core.setFailed(`${username} is not a member of NVIDIA Speech Team`);
|
|
}
|
|
|
|
acknowledge:
|
|
needs: authorize
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Add eyes reaction to comment
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
await github.rest.reactions.createForIssueComment({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
comment_id: context.payload.comment.id,
|
|
content: 'eyes'
|
|
});
|
|
|
|
claude-fix:
|
|
needs: acknowledge
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: anthropics/claude-code-action@v1
|
|
id: claude
|
|
env:
|
|
ANTHROPIC_BASE_URL: ${{ secrets.NVIDIA_INFERENCE_URL }}
|
|
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: "1"
|
|
DISABLE_PROMPT_CACHING: "1"
|
|
with:
|
|
prompt: |
|
|
You are a developer working on the NeMo repository.
|
|
Implement a focused fix for the issue based on the issue description and comments.
|
|
|
|
Requirements:
|
|
- Always use `git commit -s` to sign off all commits (DCO requirement).
|
|
- Prioritize correctness and minimal scope; avoid unrelated refactors.
|
|
- Reproduce or reason about the failure first, then implement the smallest robust fix.
|
|
- If required, add or update tests for the changed behavior. If tests are not feasible, explain why.
|
|
- If required, update related docs or comments when behavior or usage changes.
|
|
|
|
PR expectations:
|
|
- Create a new branch and open a pull request with your changes.
|
|
- Include a concise summary of root cause and fix based on the following PR template:
|
|
```
|
|
# What does this PR do ?
|
|
Add a one line overview of what this PR aims to accomplish.
|
|
|
|
# Changelog
|
|
Add specific line by line info of high level changes in this PR.
|
|
|
|
# Usage
|
|
Add a usage example of the changed functionality.
|
|
|
|
Related to #${{ github.event.issue.number }}
|
|
|
|
This PR is created by Claude.
|
|
```
|
|
|
|
|
|
anthropic_api_key: ${{ secrets.NVIDIA_INFERENCE_KEY }}
|
|
claude_args: --model "${{ vars.CLAUDE_MODEL }}"
|
|
|
|
- name: Label PR with agent-contribution
|
|
if: steps.claude.outputs.branch_name
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const prs = await github.rest.pulls.list({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
head: `${context.repo.owner}:${process.env.BRANCH_NAME}`,
|
|
state: 'open'
|
|
});
|
|
if (prs.data.length > 0) {
|
|
await github.rest.issues.addLabels({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: prs.data[0].number,
|
|
labels: ['agent-contribution']
|
|
});
|
|
}
|
|
env:
|
|
BRANCH_NAME: ${{ steps.claude.outputs.branch_name }}
|