Skip to content

Commit

Permalink
feat: add a more comprehensive labeler example for self-use and demon…
Browse files Browse the repository at this point in the history
…stration
  • Loading branch information
pplmx committed Aug 26, 2024
1 parent c7f1311 commit c715a5c
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 8 deletions.
68 changes: 61 additions & 7 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,63 @@
version: 1

labels:
- label: "TestLabel"
title: ".*"
- label: "TestFileMatch"
files:
- "cmd/.*.go"
- "pkg/.*.go"

# Type: Build-related changes
- label: "@type/build"
title: '^build(?:\(.+\))?\!?:'

# Type: CI-related changes
- label: "@type/ci"
title: '^ci(?:\(.+\))?\!?:'
files:
- '\.github/.+'

# Type: Documentation changes
- label: "@type/docs"
title: '^docs(?:\(.+\))?\!?:'
files:
- "docs/.+"
- "**/*.md"

# Type: New feature
- label: "@type/feature"
title: '^feat(?:\(.+\))?\!?:'

# Type: Bug fix
- label: "@type/fix"
title: '^fix(?:\(.+\))?\!?:'

# Type: Improvements such as style changes, refactoring, or performance improvements
- label: "@type/improve"
title: '^(style|refactor|perf)(?:\(.+\))?\!?:'

# Type: Dependency changes
- label: "@type/dependency"
title: '^(chore|build)(?:\(deps\))?\!?:'

# Type: Test-related changes
- label: "@type/test"
title: '^test(?:\(.+\))?\!?:'
files:
- "tests/.+"
- "spec/.+"

# Type: Security-related changes
- label: "@type/security"
title: '^security(?:\(.+\))?\!?:'
files:
- "**/security/.+"

# Issue Type Only: Feature Request
- label: "Feature Request"
type: issue
title: "^Feature Request:"

# Issue Type Only: Documentation
- label: "Documentation"
type: issue
title: "^.*(\b[Dd]ocumentation|doc(s)?\b).*"

# Issue Type Only: Bug Report
- label: "Bug Report"
type: issue
title: "^.*(\b[Bb]ug|b(u)?g(s)?\b).*"
3 changes: 2 additions & 1 deletion .github/workflows/apply_labels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Label PRs with published action as canary

on:
pull_request:
- pull_request
- issues

jobs:
apply_labels:
Expand Down

0 comments on commit c715a5c

Please sign in to comment.