Add Python syntax compatibility workflow #607
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 Answer Issue | |
| on: | |
| issue_comment: | |
| types: [created] | |
| permissions: | |
| contents: read | |
| issues: write | |
| id-token: write | |
| jobs: | |
| authorize: | |
| if: >- | |
| !github.event.issue.pull_request && | |
| contains(github.event.comment.body, '/claude answer') | |
| 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-answer: | |
| needs: acknowledge | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: anthropics/claude-code-action@v1 | |
| with: | |
| prompt: | | |
| You are a helpful assistant for the NeMo repository. | |
| Answer the user's question based on the issue description, comments, and the codebase. | |
| Be concise and provide code references where relevant. | |
| Do NOT make any code changes or create PRs — only answer the question. | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |