diff --git a/.github/labeler-action.yml b/.github/labeler-action.yml new file mode 100644 index 0000000000..5935db5d05 --- /dev/null +++ b/.github/labeler-action.yml @@ -0,0 +1,6 @@ +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/multi-labeler.yml b/.github/multi-labeler.yml new file mode 100644 index 0000000000..60339cd46b --- /dev/null +++ b/.github/multi-labeler.yml @@ -0,0 +1,19 @@ +version: v1 + +labels: + - label: 'enhancement' + sync: true + matcher: + title: '^feat:.*' + - label: 'document' + sync: true + matcher: + title: '^docs:.*' + - label: 'bug' + sync: true + matcher: + title: '^fix:.*' + - label: 'ospp-2024' + sync: true + matcher: + baseBranch: '^ospp-2024/.*' \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1651385671..423a9ef0ab 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,15 +9,25 @@ 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 }} + # configuration-path: '.github/labeler-action.yml' + # sync-labels: true + - uses: fuxingloh/multi-labeler@v4 # v4 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/pr-labeler.yml + 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: + # 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