From 8b04fef52810f1a720785685b527ebc356206e87 Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 20 Jul 2022 09:45:54 -0600 Subject: [PATCH] chore: add labeler (#10285) --- .github/PULL_REQUEST_TEMPLATE.md | 2 ++ .github/labeler.yml | 12 ++++++++++++ .github/workflows/pr-lint.yml | 11 +++++++++++ .github/workflows/test.yml | 13 +++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 .github/labeler.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e58b86ae01..ec6b5bfaa1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,6 +17,8 @@ Please include route starts with /, with all required and optional parameters. F ```route /some/route /some/other/route +/dont/use/this/or/modify/it +/use/the/fenced/code/block/below ``` 如果你的 PR 与路由无关, 请在 `routes` 区域 填写 `NOROUTE`,而不是直接删除 `routes` 区域。否则你的 PR 将会被无条件关闭。 If your changes are not related to route, please fill in `routes` with `NOROUTE`. Fail to comply will result in your PR being closed. diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..ac5f5da530 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,12 @@ +'Route: v1': +- any: ['lib/routes/**/*.js', '!lib/routes/index.js'] + +'Route: v2': +- 'lib/v2/**/*.js' + +core enhancement: +- lib/routes/index.js +- any: ['lib/**', '!lib/routes/**', '!lib/v2/**/*.js'] + +dependencies: +- yarn.lock diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index b1b3f650e1..fe1bca16da 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -42,3 +42,14 @@ jobs: ignoreLabels: | dependencies wip: true + labeler: + name: Pull Request Labeler + if: ${{ github.event_name == 'pull_request_target' }} + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6df6c8a9bf..d74653da93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,3 +122,16 @@ jobs: - run: yarn - name: Build radar and maintainer run: npm run build:all + + automerge: + if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' + needs: [ jest, puppeteer, docs, all ] + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + - uses: fastify/github-action-merge-dependabot@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + target: patch