🧹 Remove unused import RateLimitError from cloud_ai.py #32
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 Label | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronized] | |
| jobs: | |
| label: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const { data: files } = await github.rest.pulls.listFiles({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number | |
| }); | |
| const labels = new Set(); | |
| for (const file of files) { | |
| const path = file.filename; | |
| if (path.includes('docs/') || path.endsWith('.md')) labels.add('documentation'); | |
| if (path.includes('test/') || path.includes('.test.') || path.includes('.spec.')) labels.add('tests'); | |
| if (path.includes('.github/workflows/')) labels.add('ci/cd'); | |
| if (path.endsWith('.js') || path.endsWith('.ts') || path.endsWith('.jsx') || path.endsWith('.tsx')) labels.add('javascript'); | |
| if (path.endsWith('.py')) labels.add('python'); | |
| if (path.endsWith('.css') || path.endsWith('.scss') || path.endsWith('.sass')) labels.add('styling'); | |
| } | |
| if (labels.size > 0) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: Array.from(labels) | |
| }); | |
| } |