test action #69
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: Addon Tag Review | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths: | |
| - 'addons/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| issues: write | |
| jobs: | |
| review: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.repository.default_branch }} | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Install Dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: Review pull request addon tags | |
| if: github.event_name == 'pull_request_target' | |
| shell: bash | |
| env: | |
| PYTHONPATH: src | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| AI_REVIEW_BASE_URL: ${{ secrets.AI_REVIEW_BASE_URL }} | |
| AI_REVIEW_API_KEY: ${{ secrets.AI_REVIEW_API_KEY }} | |
| AI_REVIEW_MODEL: ${{ secrets.AI_REVIEW_MODEL }} | |
| run: | | |
| python3 -m zotero_scraper.tag_review \ | |
| --pr-number "${{ github.event.pull_request.number }}" \ | |
| --repository "${{ github.repository }}" \ | |
| --ai-review \ | |
| --post-comment \ | |
| --summary-file "$GITHUB_STEP_SUMMARY" | |
| - name: Review all addon tags | |
| if: github.event_name == 'workflow_dispatch' | |
| shell: bash | |
| env: | |
| PYTHONPATH: src | |
| run: | | |
| mapfile -t files < <(git ls-files addons) | |
| python3 -m zotero_scraper.tag_review \ | |
| --files "${files[@]}" \ | |
| --summary-file "$GITHUB_STEP_SUMMARY" |