cannot import name 'BaseTool' #13
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: Auto PR Comment | |
| # Sequential: wait for first reviewer, then trigger Copilot | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request_review: | |
| types: [submitted] | |
| jobs: | |
| copilot-after-coderabbit: | |
| if: | | |
| github.event_name == 'issue_comment' && | |
| github.event.issue.pull_request && | |
| github.event.comment.user.login == 'coderabbitai[bot]' && | |
| contains(github.event.comment.body, 'summary by coderabbit') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Post Copilot review request | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const comments = await github.rest.issues.listComments({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo | |
| }); | |
| if (comments.data.some(c => c.user.login === 'github-actions[bot]' && c.body.includes('@copilot'))) { | |
| console.log('Copilot already triggered, skipping'); | |
| return; | |
| } | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '@copilot Do a thorough review of this PR. Read ALL existing reviewer comments first.\n\n1. **Bloat check**: Minimal and focused?\n2. **Security**: Hardcoded secrets, unsafe eval?\n3. **Performance**: Module-level heavy imports?\n4. **Tests**: Adequate coverage?\n5. **Code quality**: DRY, naming, error handling?' | |
| }) | |
| copilot-after-qodo: | |
| if: | | |
| github.event_name == 'pull_request_review' && | |
| github.event.review.user.login == 'qodo-code-review[bot]' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Post Copilot review request (fallback) | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const comments = await github.rest.issues.listComments({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo | |
| }); | |
| if (comments.data.some(c => c.user.login === 'github-actions[bot]' && c.body.includes('@copilot'))) { | |
| console.log('Copilot already triggered, skipping'); | |
| return; | |
| } | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '@copilot Do a thorough review of this PR. Read ALL existing reviewer comments first.\n\n1. **Bloat check**: Minimal and focused?\n2. **Security**: Hardcoded secrets?\n3. **Performance**: Heavy imports?\n4. **Tests**: Coverage?\n5. **Code quality**: DRY, naming, errors?' | |
| }) |