Auto-label PRs based on files + targeting release
| @@ -0,0 +1,29 @@ | ||
| 1 | +🏭 Backend Changes: | |
| 2 | + - "src/**" | |
| 3 | + - "server.js" | |
| 4 | + - "plugins.js" | |
| 5 | + - "recover.js" | |
| 6 | + - "webpack.config.js" | |
| 7 | + - "Start.bat" | |
| 8 | + - "start.sh" | |
| 9 | + - "UpdateAndStart.bat" | |
| 10 | + - "UpdateForkAndStart.bat" | |
| 11 | + | |
| 12 | +🛠️ Build Changes: | |
| 13 | + - ".github/workflows/**" | |
| 14 | + - "docker/**" | |
| 15 | + - ".dockerignore" | |
| 16 | + - "Dockerfile" | |
| 17 | + - "webpack.config.js" | |
| 18 | + | |
| 19 | +🌐 Language: | |
| 20 | + - "public/locales/**" | |
| 21 | + | |
| 22 | +📥 Dependencies: | |
| 23 | + - "public/lib/**" # Every frontend lib counts as a dependency as well | |
| 24 | + - "package.json" | |
| 25 | + - "package-lock.json" | |
| 26 | + - "tests/package.json" | |
| 27 | + - "tests/package-lock.json" | |
| 28 | + - "src/electron/package.json" | |
| 29 | + - "src/electron/package-lock.json" | |
| @@ -20,7 +20,7 @@ jobs: | ||
| 20 | 20 | # https://github.com/marketplace/actions/regex-issue-labeler |
| 21 | 21 | uses: github/issue-labeler@v3 |
| 22 | 22 | with: |
| 23 | 23 | configuration-path: .github/issues-auto-labelerlabels.yml |
| 24 | 24 | enable-versioned-regex: 0 |
| 25 | 25 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 26 | 26 | |
| @@ -20,7 +20,7 @@ jobs: | ||
| 20 | 20 | commentOnDirty: "This pull request has conflicts. Please resolve them, otherwise it cannot be merged." |
| 21 | 21 | |
| 22 | 22 | pr-size-labeler: |
| 23 | 23 | name: Apply Label for PR Size |
| 24 | 24 | runs-on: ubuntu-latest |
| 25 | 25 | |
| 26 | 26 | steps: |
| @@ -49,6 +49,30 @@ jobs: | ||
| 49 | 49 | "package-lock.json" |
| 50 | 50 | "public/lib/*" |
| 51 | 51 | |
| 52 | + label-release-prs: | |
| 53 | + name: Label PRs Targeting Release Branch | |
| 54 | + runs-on: ubuntu-latest | |
| 55 | + | |
| 56 | + steps: | |
| 57 | + - name: Label PRs Targeting Release Branch | |
| 58 | + if: github.base_ref == 'release' | |
| 59 | + run: | | |
| 60 | + gh pr edit ${{ github.event.pull_request.number }} --add-label "❗ Against Release Branch" | |
| 61 | + env: | |
| 62 | + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | |
| 63 | + | |
| 64 | + apply-file-based-labels: | |
| 65 | + name: Apply Labels Based on Changed Files | |
| 66 | + runs-on: ubuntu-latest | |
| 67 | + | |
| 68 | + steps: | |
| 69 | + - name: Apply Labels Based on Changed Files | |
| 70 | + # Pull Request Labeler | |
| 71 | + # https://github.com/marketplace/actions/labeler | |
| 72 | + uses: actions/labeler@v5 | |
| 73 | + with: | |
| 74 | + repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | |
| 75 | + | |
| 52 | 76 | pr-auto-comments: |
| 53 | 77 | name: Post PR Comments Based on Labels |
| 54 | 78 | needs: [check-merge-conflicts, pr-size-labeler] |