Skip to content

Commit

Permalink
ci: added labeler & pr title validation
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 4, 2024
1 parent af30bd6 commit 3839702
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
core:
- all:
- changed-files:
- any-glob-to-any-file: "lua/tokyonight/**"
- all-globs-to-all-files:
- "!lua/tokyonight/groups/**"
- "!lua/tokyonight/colors/**"
- "!lua/tokyonight/extra/**"

extras:
- changed-files:
- any-glob-to-any-file: "lua/tokyonight/extra/**"

groups:
- changed-files:
- any-glob-to-any-file: "lua/tokyonight/groups/**"

base:
- changed-files:
- any-glob-to-any-file:
- "lua/tokyonight/groups/base.lua"
- "lua/tokyonight/groups/kinds.lua"
- "lua/tokyonight/groups/treesitter.lua"
- "lua/tokyonight/groups/semantic_tokens.lua"

colors:
- changed-files:
- any-glob-to-any-file: "lua/tokyonight/colors/**"
12 changes: 12 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
41 changes: 41 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
requireScope: true
subjectPattern: ^(?![A-Z]).+$
scopes: |
.+
types: |
build
chore
ci
docs
feat
fix
merge
perf
refactor
revert
style
test
wip
ignoreLabels: |
autorelease: pending

0 comments on commit 3839702

Please sign in to comment.