diff --git a/.github/issues-auto-labeler.yml b/.github/issues-auto-labels.yml similarity index 100% rename from .github/issues-auto-labeler.yml rename to .github/issues-auto-labels.yml diff --git a/.github/pr-auto-labels,yml b/.github/pr-auto-labels,yml new file mode 100644 index 000000000..1e94c18da --- /dev/null +++ b/.github/pr-auto-labels,yml @@ -0,0 +1,29 @@ +🏭 Backend Changes: + - "src/**" + - "server.js" + - "plugins.js" + - "recover.js" + - "webpack.config.js" + - "Start.bat" + - "start.sh" + - "UpdateAndStart.bat" + - "UpdateForkAndStart.bat" + +🛠️ Build Changes: + - ".github/workflows/**" + - "docker/**" + - ".dockerignore" + - "Dockerfile" + - "webpack.config.js" + +🌐 Language: + - "public/locales/**" + +📥 Dependencies: + - "public/lib/**" # Every frontend lib counts as a dependency as well + - "package.json" + - "package-lock.json" + - "tests/package.json" + - "tests/package-lock.json" + - "src/electron/package.json" + - "src/electron/package-lock.json" diff --git a/.github/workflows/issues-auto-manager.yml b/.github/workflows/issues-auto-manager.yml index 72f1c8ca9..00b67258e 100644 --- a/.github/workflows/issues-auto-manager.yml +++ b/.github/workflows/issues-auto-manager.yml @@ -20,7 +20,7 @@ jobs: # https://github.com/marketplace/actions/regex-issue-labeler uses: github/issue-labeler@v3 with: - configuration-path: .github/issues-auto-labeler.yml + configuration-path: .github/issues-auto-labels.yml enable-versioned-regex: 0 repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-auto-manager.yml b/.github/workflows/pr-auto-manager.yml index 83e3bf51b..03ef5884e 100644 --- a/.github/workflows/pr-auto-manager.yml +++ b/.github/workflows/pr-auto-manager.yml @@ -20,7 +20,7 @@ jobs: commentOnDirty: "This pull request has conflicts. Please resolve them, otherwise it cannot be merged." pr-size-labeler: - name: Label PR Size + name: Apply Label for PR Size runs-on: ubuntu-latest steps: @@ -49,6 +49,30 @@ jobs: "package-lock.json" "public/lib/*" + label-release-prs: + name: Label PRs Targeting Release Branch + runs-on: ubuntu-latest + + steps: + - name: Label PRs Targeting Release Branch + if: github.base_ref == 'release' + run: | + gh pr edit ${{ github.event.pull_request.number }} --add-label "❗ Against Release Branch" + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + + apply-file-based-labels: + name: Apply Labels Based on Changed Files + runs-on: ubuntu-latest + + steps: + - name: Apply Labels Based on Changed Files + # Pull Request Labeler + # https://github.com/marketplace/actions/labeler + uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + pr-auto-comments: name: Post PR Comments Based on Labels needs: [check-merge-conflicts, pr-size-labeler]