deps(deps-dev): bump black from 26.1.0 to 26.5.1 #123
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: PR Automation | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| pr-labels: | |
| name: Auto-label PR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/labeler@v6 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| configuration-path: .github/labeler.yml | |
| pr-size: | |
| name: Label PR Size | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: codelytv/pr-size-labeler@v1 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| xs_label: 'size/xs' | |
| xs_max_size: 10 | |
| s_label: 'size/s' | |
| s_max_size: 100 | |
| m_label: 'size/m' | |
| m_max_size: 500 | |
| l_label: 'size/l' | |
| l_max_size: 1000 | |
| xl_label: 'size/xl' | |
| fail_if_xl: false | |
| require-tests: | |
| name: Require Tests for Code Changes | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for code changes | |
| id: code_changes | |
| run: | | |
| # Check if there are changes to source code | |
| if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '^devsync/.*\.py$'; then | |
| echo "has_code_changes=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_code_changes=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Check for test changes | |
| id: test_changes | |
| run: | | |
| # Check if there are changes to tests | |
| if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '^tests/.*\.py$'; then | |
| echo "has_test_changes=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_test_changes=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Comment if tests are missing | |
| if: steps.code_changes.outputs.has_code_changes == 'true' && steps.test_changes.outputs.has_test_changes == 'false' | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '⚠️ **Code changes detected without test changes**\n\nThis PR modifies source code but does not include test changes. Please consider adding tests for your changes.' | |
| }) | |
| # Conventional commits check disabled - too strict for project needs | |
| # pr-conventional-commits: | |
| # name: Check Conventional Commits | |
| # runs-on: ubuntu-latest | |
| # if: github.event_name == 'pull_request' | |
| # steps: | |
| # - uses: actions/checkout@v6 | |
| # with: | |
| # fetch-depth: 0 | |
| # | |
| # - name: Check PR title | |
| # uses: amannn/action-semantic-pull-request@v6 | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # with: | |
| # types: | | |
| # feat | |
| # fix | |
| # docs | |
| # style | |
| # refactor | |
| # perf | |
| # test | |
| # build | |
| # ci | |
| # chore | |
| # revert | |
| # requireScope: false | |
| # subjectPattern: ^[A-Z].+$ | |
| # subjectPatternError: | | |
| # The subject "{subject}" found in the pull request title "{title}" | |
| # doesn't match the configured pattern. Please ensure that the subject | |
| # starts with an uppercase character. |