chore(deps): update dependency community.docker to v4.7.0 #20
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: Labeler | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| concurrency: | |
| group: labeler-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| label: | |
| runs-on: ubuntu-latest | |
| name: Auto-Label by File Path | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Label PR based on changed files | |
| uses: actions/labeler@v5 | |
| with: | |
| repo-token: "${{ secrets.GITHUB_TOKEN }}" | |
| configuration-path: .github/labeler.yml | |
| sync-labels: true | |
| - name: Add labeling summary | |
| uses: actions/github-script@v7 | |
| if: github.event.action == 'opened' | |
| with: | |
| script: | | |
| // Get current labels that were just applied | |
| const { data: currentLabels } = await github.rest.issues.listLabelsOnIssue({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| }); | |
| const pathLabels = currentLabels | |
| .map(label => label.name) | |
| .filter(name => !name.startsWith('size/') && | |
| !name.includes('complexity') && | |
| !name.includes('work-in-progress') && | |
| !name.includes('needs-rebase') && | |
| !name.includes('security-review-required')); | |
| if (pathLabels.length > 0) { | |
| console.log(`Applied path-based labels: ${pathLabels.join(', ')}`); | |
| // Add a small comment about the automatic labeling | |
| const comment = `🏷️ **Auto-labeled** based on changed file paths: \`${pathLabels.join('`, `')}\``; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body: comment | |
| }); | |
| } |