|
1 | | -#FIXME: used to test. Can be reworked to automatic labelling (fixes, features ,c , go , ...) |
2 | | -# Add 'AnyChange' label to any changes within the entire repository |
| 1 | + |
| 2 | +# Automatically adds labels to issues or pull requests based on content or file changes. |
| 3 | + |
| 4 | +# .github/labeler.yml |
| 5 | +# |
| 6 | +# This file configures the GitHub "labeler" action. |
| 7 | +# It automatically adds labels to pull requests based on: |
| 8 | +# - which files were changed (changed-files) |
| 9 | +# - the PR title or description (title, body) |
| 10 | +# |
| 11 | +# IMPORTANT: |
| 12 | +# - All label names used below (e.g. "go", "c", "docs") must exist |
| 13 | +# as labels in the GitHub repository settings. |
| 14 | +# - This file affects pull requests only (not individual commits). |
| 15 | + |
| 16 | +# -------------------------------------------------------------------- |
| 17 | +# Label: AnyChange |
| 18 | +# -------------------------------------------------------------------- |
| 19 | +# Purpose: |
| 20 | +# - Add a very generic label to any pull request that touches any file. |
| 21 | +# - This can be useful if you want to trigger other automations or |
| 22 | +# simply mark “this PR changes something”. |
| 23 | +# |
| 24 | +# When is it applied? |
| 25 | +# - Whenever *any* file in the repository is changed. |
3 | 26 | AnyChange: |
4 | | -- changed-files: |
5 | | - - any-glob-to-any-file: '**' |
| 27 | + - changed-files: |
| 28 | + # Match any file in the repository. |
| 29 | + - any-glob-to-any-file: '**' |
| 30 | + |
| 31 | + |
| 32 | +# -------------------------------------------------------------------- |
| 33 | +# Label: go |
| 34 | +# -------------------------------------------------------------------- |
| 35 | +# Purpose: |
| 36 | +# - Mark pull requests that modify Go source files. |
| 37 | +# |
| 38 | +# When is it applied? |
| 39 | +# - If any *.go file is changed anywhere in the repository. |
| 40 | +go: |
| 41 | + - changed-files: |
| 42 | + - any-glob-to-any-file: '**/*.go' |
| 43 | + |
| 44 | + |
| 45 | +# -------------------------------------------------------------------- |
| 46 | +# Label: c |
| 47 | +# -------------------------------------------------------------------- |
| 48 | +# Purpose: |
| 49 | +# - Mark pull requests that touch C source or header files. |
| 50 | +# |
| 51 | +# When is it applied? |
| 52 | +# - If any *.c or *.h file is changed in typical C locations. |
| 53 | +# - You can adjust the paths below to match your project layout. |
| 54 | +c: |
| 55 | + - changed-files: |
| 56 | + # C sources and headers in src/ |
| 57 | + - any-glob-to-any-file: 'src/**/*.c' |
| 58 | + - any-glob-to-any-file: 'src/**/*.h' |
| 59 | + |
| 60 | + # C sources and headers in examples/ |
| 61 | + - any-glob-to-any-file: 'examples/**/*.c' |
| 62 | + - any-glob-to-any-file: 'examples/**/*.h' |
| 63 | + |
| 64 | + # C sources and headers in the _test directory |
| 65 | + - any-glob-to-any-file: '_test/**/*.c' |
| 66 | + - any-glob-to-any-file: '_test/**/*.h' |
| 67 | + |
| 68 | + |
| 69 | +# -------------------------------------------------------------------- |
| 70 | +# Label: docs |
| 71 | +# -------------------------------------------------------------------- |
| 72 | +# Purpose: |
| 73 | +# - Mark pull requests that primarily modify documentation. |
| 74 | +# |
| 75 | +# When is it applied? |
| 76 | +# - If files in docs/ are changed, or *.md files anywhere. |
| 77 | +docs: |
| 78 | + - changed-files: |
| 79 | + # Any file inside the docs/ folder |
| 80 | + - any-glob-to-any-file: 'docs/**' |
| 81 | + |
| 82 | + # Any Markdown file (README, guides, etc.) |
| 83 | + - any-glob-to-any-file: '**/*.md' |
| 84 | + |
| 85 | + |
| 86 | +# -------------------------------------------------------------------- |
| 87 | +# Label: tests |
| 88 | +# -------------------------------------------------------------------- |
| 89 | +# Purpose: |
| 90 | +# - Mark pull requests that add or modify tests. |
| 91 | +# |
| 92 | +# When is it applied? |
| 93 | +# - If Go test files or other test-related files are changed. |
| 94 | +tests: |
| 95 | + - changed-files: |
| 96 | + # Go test files |
| 97 | + - any-glob-to-any-file: '**/*_test.go' |
| 98 | + |
| 99 | + # Any files inside a _test folder (C tests, configs, etc.) |
| 100 | + - any-glob-to-any-file: '_test/**' |
| 101 | + |
| 102 | + |
| 103 | +# -------------------------------------------------------------------- |
| 104 | +# Label: ci |
| 105 | +# -------------------------------------------------------------------- |
| 106 | +# Purpose: |
| 107 | +# - Mark pull requests that change Continuous Integration (CI) |
| 108 | +# or GitHub-related configuration. |
| 109 | +# |
| 110 | +# When is it applied? |
| 111 | +# - If files under .github/ are modified (workflows, templates, etc.). |
| 112 | +ci: |
| 113 | + - changed-files: |
| 114 | + - any-glob-to-any-file: '.github/**' |
| 115 | + |
| 116 | + |
| 117 | +# -------------------------------------------------------------------- |
| 118 | +# Label: fix |
| 119 | +# -------------------------------------------------------------------- |
| 120 | +# Purpose: |
| 121 | +# - Mark pull requests that appear to fix a bug. |
| 122 | +# |
| 123 | +# When is it applied? |
| 124 | +# - If the PR title or description contains the word "fix". |
| 125 | +# (Case-sensitive by default; if needed, you can switch to regex.) |
| 126 | +# |
| 127 | +# Note: |
| 128 | +# - These matchers are very simple on purpose. |
| 129 | +# - They work well with conventional commit messages such as: |
| 130 | +# "fix: handle empty input" |
| 131 | +fix: |
| 132 | + # PR title contains "fix" |
| 133 | + - title: 'fix' |
| 134 | + # PR body (description) contains "fix" |
| 135 | + - body: 'fix' |
| 136 | + |
| 137 | + |
| 138 | +# -------------------------------------------------------------------- |
| 139 | +# Label: feature |
| 140 | +# -------------------------------------------------------------------- |
| 141 | +# Purpose: |
| 142 | +# - Mark pull requests that introduce new features. |
| 143 | +# |
| 144 | +# When is it applied? |
| 145 | +# - If the PR title or description contains "feat" or "feature". |
| 146 | +# |
| 147 | +# Note: |
| 148 | +# - This works nicely with conventional commit style messages like: |
| 149 | +# "feat: add new logging options" |
| 150 | +# "feature: support additional hardware" |
| 151 | +feature: |
| 152 | + # PR title contains "feat" |
| 153 | + - title: 'feat' |
| 154 | + # PR body contains "feat" |
| 155 | + - body: 'feat' |
6 | 156 |
|
| 157 | + # PR title contains "feature" |
| 158 | + - title: 'feature' |
| 159 | + # PR body contains "feature" |
| 160 | + - body: 'feature' |
0 commit comments