From fe38d79aca16e8b44555cf5b5601271514c2959a Mon Sep 17 00:00:00 2001 From: hexqi Date: Mon, 26 Aug 2024 19:44:25 +0800 Subject: [PATCH 1/6] feat: try labeler-action --- .github/labeler-action.yml | 23 ++++++++++++++++++++ .github/workflows/labeler.yml | 22 ++++++++++++------- .github/workflows/push-check.yml | 36 -------------------------------- 3 files changed, 37 insertions(+), 44 deletions(-) create mode 100644 .github/labeler-action.yml delete mode 100644 .github/workflows/push-check.yml diff --git a/.github/labeler-action.yml b/.github/labeler-action.yml new file mode 100644 index 0000000000..c81059432a --- /dev/null +++ b/.github/labeler-action.yml @@ -0,0 +1,23 @@ +# enable labeler on issues, prs, or both. +enable: + issues: false + prs: true + +# Labels is an object where: +# - keys are labels +# - values are objects of { include: [ pattern ], exclude: [ pattern ] } +# - pattern must be a valid regex, and is applied globally to +# title + description of issues and/or prs (see enabled config above) +# - 'include' patterns will associate a label if any of these patterns match +# - 'exclude' patterns will ignore this label if any of these patterns match +labels: + 'bug': + include: + - '\bbug[s]?\b' + - '\bfix\b' + exclude: [] + 'enhancement': + include: + - '\bfeat\b' + - '\bfeature\b' + exclude: [] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1651385671..f3db2a052d 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,15 +9,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/labeler@v5 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - sync-labels: true - - name: Apply labels based on PR title - uses: TimonVS/pr-labeler-action@v5 + # - uses: actions/labeler@v5 + # with: + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # sync-labels: true + - name: Check Labels + id: labeler + uses: jimschubert/labeler-action@v2 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/pr-labeler.yml + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + config-path: '.github/labeler-action.yml' + # - name: Apply labels based on PR title + # uses: TimonVS/pr-labeler-action@v5 + # with: + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # configuration-path: .github/pr-labeler.yml # - uses: ZeWaka/KeywordLabeler@master # with: # repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/push-check.yml b/.github/workflows/push-check.yml deleted file mode 100644 index 509d951e48..0000000000 --- a/.github/workflows/push-check.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Push And Create PR Check - -on: - push: - branches: [] - pull_request: - branches: [develop,main, refactor/develop] - -jobs: - push-check: - runs-on: ubuntu-latest # windows-latest || macos-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install pnpm - run: npm i -g pnpm - - - name: Install dependencies - run: pnpm i - - - name: Get changed files - id: get_changed_files - uses: tj-actions/changed-files@v41 - with: - files: | - **.js - **.vue - **.jsx - - name: Run ESLint - run: npx eslint ${{steps.get_changed_files.outputs.all_changed_files}} - - name: Run Build - run: pnpm run build:plugin && pnpm run build:alpha From 132ab9d3370e54a2738eb8186682796ce498bb87 Mon Sep 17 00:00:00 2001 From: hexqi Date: Mon, 26 Aug 2024 19:52:48 +0800 Subject: [PATCH 2/6] feat: update --- .github/labeler-action.yml | 33 +++++++++++---------------------- .github/labeler.yml | 33 ++++++++++++++++++++++----------- .github/workflows/labeler.yml | 10 +++++----- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/labeler-action.yml b/.github/labeler-action.yml index c81059432a..40be646090 100644 --- a/.github/labeler-action.yml +++ b/.github/labeler-action.yml @@ -1,23 +1,12 @@ -# enable labeler on issues, prs, or both. -enable: - issues: false - prs: true +bug: +- title: 'fix*' -# Labels is an object where: -# - keys are labels -# - values are objects of { include: [ pattern ], exclude: [ pattern ] } -# - pattern must be a valid regex, and is applied globally to -# title + description of issues and/or prs (see enabled config above) -# - 'include' patterns will associate a label if any of these patterns match -# - 'exclude' patterns will ignore this label if any of these patterns match -labels: - 'bug': - include: - - '\bbug[s]?\b' - - '\bfix\b' - exclude: [] - 'enhancement': - include: - - '\bfeat\b' - - '\bfeature\b' - exclude: [] +enhancement: +- title: 'feat*' + +ospp-2024: +- base-branch: ['ospp-2024/*'] + +document: +- changed-files: + - any-glob-to-any-file: ['docs/*', '**/*.md'] diff --git a/.github/labeler.yml b/.github/labeler.yml index 40be646090..c81059432a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,12 +1,23 @@ -bug: -- title: 'fix*' +# enable labeler on issues, prs, or both. +enable: + issues: false + prs: true -enhancement: -- title: 'feat*' - -ospp-2024: -- base-branch: ['ospp-2024/*'] - -document: -- changed-files: - - any-glob-to-any-file: ['docs/*', '**/*.md'] +# Labels is an object where: +# - keys are labels +# - values are objects of { include: [ pattern ], exclude: [ pattern ] } +# - pattern must be a valid regex, and is applied globally to +# title + description of issues and/or prs (see enabled config above) +# - 'include' patterns will associate a label if any of these patterns match +# - 'exclude' patterns will ignore this label if any of these patterns match +labels: + 'bug': + include: + - '\bbug[s]?\b' + - '\bfix\b' + exclude: [] + 'enhancement': + include: + - '\bfeat\b' + - '\bfeature\b' + exclude: [] diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index f3db2a052d..c167419610 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,16 +9,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - # - uses: actions/labeler@v5 - # with: - # repo-token: ${{ secrets.GITHUB_TOKEN }} - # sync-labels: true + - uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: '.github/labeler-action.yml' + sync-labels: true - name: Check Labels id: labeler uses: jimschubert/labeler-action@v2 with: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - config-path: '.github/labeler-action.yml' # - name: Apply labels based on PR title # uses: TimonVS/pr-labeler-action@v5 # with: From 220985ccc2f33d63a3598d9f7c81bb4e589fccd3 Mon Sep 17 00:00:00 2001 From: hexqi Date: Mon, 26 Aug 2024 20:12:34 +0800 Subject: [PATCH 3/6] feat: update --- .github/labeler-action.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/labeler-action.yml b/.github/labeler-action.yml index 40be646090..5935db5d05 100644 --- a/.github/labeler-action.yml +++ b/.github/labeler-action.yml @@ -1,9 +1,3 @@ -bug: -- title: 'fix*' - -enhancement: -- title: 'feat*' - ospp-2024: - base-branch: ['ospp-2024/*'] From 9e0bc702047af33f5e1f7d329754701fb79ab2e1 Mon Sep 17 00:00:00 2001 From: hexqi Date: Mon, 26 Aug 2024 20:27:40 +0800 Subject: [PATCH 4/6] feat: multi-labeler --- .github/multi-labeler.yml | 21 +++++++++++++++++++++ .github/workflows/labeler.yml | 22 +++++++++++++--------- 2 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 .github/multi-labeler.yml diff --git a/.github/multi-labeler.yml b/.github/multi-labeler.yml new file mode 100644 index 0000000000..438030e690 --- /dev/null +++ b/.github/multi-labeler.yml @@ -0,0 +1,21 @@ +# .github/labeler.yml + +version: v1 + +labels: + - label: 'enhancement' + sync: true # remove label if match failed, default: false (pull_request/issue only) + matcher: + # Matcher will match on any 8 matchers + title: '^feat:.*' + title: '^feature:.*' + - label: 'bug' + sync: true # remove label if match failed, default: false (pull_request/issue only) + matcher: + # Matcher will match on any 8 matchers + title: '^fix:.*' + - label: 'ospp-2024' + sync: true # remove label if match failed, default: false (pull_request/issue only) + matcher: + # Matcher will match on any 8 matchers + baseBranch: '^ospp-2024/.*' \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index c167419610..423a9ef0ab 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,16 +9,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/labeler@v5 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: '.github/labeler-action.yml' - sync-labels: true - - name: Check Labels - id: labeler - uses: jimschubert/labeler-action@v2 + # - uses: actions/labeler@v5 + # with: + # repo-token: ${{ secrets.GITHUB_TOKEN }} + # configuration-path: '.github/labeler-action.yml' + # sync-labels: true + - uses: fuxingloh/multi-labeler@v4 # v4 with: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + github-token: ${{ secrets.GITHUB_TOKEN }} # optional, default to '${{ github.token }}' + config-path: .github/multi-labeler.yml # optional, default to '.github/labeler.yml' + # - name: Check Labels + # id: labeler + # uses: jimschubert/labeler-action@v2 + # with: + # GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} # - name: Apply labels based on PR title # uses: TimonVS/pr-labeler-action@v5 # with: From 1db41b7d395b722eab9c0998535dc07fd2367e04 Mon Sep 17 00:00:00 2001 From: hexqi Date: Mon, 26 Aug 2024 20:29:38 +0800 Subject: [PATCH 5/6] update --- .github/multi-labeler.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/multi-labeler.yml b/.github/multi-labeler.yml index 438030e690..c79a764cc2 100644 --- a/.github/multi-labeler.yml +++ b/.github/multi-labeler.yml @@ -1,5 +1,3 @@ -# .github/labeler.yml - version: v1 labels: @@ -7,8 +5,7 @@ labels: sync: true # remove label if match failed, default: false (pull_request/issue only) matcher: # Matcher will match on any 8 matchers - title: '^feat:.*' - title: '^feature:.*' + title: ['^feat:.*', '^feature:.*'] - label: 'bug' sync: true # remove label if match failed, default: false (pull_request/issue only) matcher: From 45d6c9c2b718b2844e4104700ea7774277b2803e Mon Sep 17 00:00:00 2001 From: hexqi Date: Mon, 26 Aug 2024 20:32:11 +0800 Subject: [PATCH 6/6] update --- .github/multi-labeler.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/multi-labeler.yml b/.github/multi-labeler.yml index c79a764cc2..60339cd46b 100644 --- a/.github/multi-labeler.yml +++ b/.github/multi-labeler.yml @@ -2,17 +2,18 @@ version: v1 labels: - label: 'enhancement' - sync: true # remove label if match failed, default: false (pull_request/issue only) + sync: true matcher: - # Matcher will match on any 8 matchers - title: ['^feat:.*', '^feature:.*'] + title: '^feat:.*' + - label: 'document' + sync: true + matcher: + title: '^docs:.*' - label: 'bug' - sync: true # remove label if match failed, default: false (pull_request/issue only) + sync: true matcher: - # Matcher will match on any 8 matchers title: '^fix:.*' - label: 'ospp-2024' - sync: true # remove label if match failed, default: false (pull_request/issue only) + sync: true matcher: - # Matcher will match on any 8 matchers baseBranch: '^ospp-2024/.*' \ No newline at end of file