Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: labeler #15

Open
wants to merge 10 commits into
base: ospp-2024/test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/keylabeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Determines if we search the title (optional). Defaults to true.
matchTitle: true

# Determines if we search the body (optional). Defaults to true.
matchBody: false

# Determines if label matching is case sensitive (optional). Defaults to true.
caseSensitive: false

# By default, the labeler looks for a specific string phrase.
# Therefore, this can create false positives like "fix" being found in "fixture".
# You can use regex instead to reduce those false positives. Defaults to false.
useRegex: false

# Explicit keyword mappings to labels. Form of match:label. Required.
labelMappings:
docs: document
feature: enhancement
feat: enhancement
fix: bug
6 changes: 6 additions & 0 deletions .github/labeler-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ospp-2024:
- base-branch: ['ospp-2024/*']

document:
- changed-files:
- any-glob-to-any-file: ['docs/*', '**/*.md']
23 changes: 23 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -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: []
19 changes: 19 additions & 0 deletions .github/multi-labeler.yml
Original file line number Diff line number Diff line change
@@ -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/.*'
3 changes: 3 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enhancement: ['feature*', 'feat*']
bug: ['fix*']
chore: ['chore*']
20 changes: 20 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
autolabeler:
- label: 'document'
files:
- '*.md'
- 'docs/*'
branch:
- '/docs{0,1}\/.+/'
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feat(ure)?\/.+/'
title:
- '/feat(ure)?/i'
- label: 'ospp-2024'
branch:
- 'ospp-2024/*'
40 changes: 40 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Pull Request Labeler

on:
pull_request:
types: [opened, edited]

jobs:
label:
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
- uses: fuxingloh/multi-labeler@v4 # v4
with:
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 }}
# - name: "Assign label based on the title"
# uses: Bhacaz/label-regex@v2.1
# with:
# field: title
# regex: '([A-Z]+?)-'
# lowercase: true
# token: ${{ github.token }}
36 changes: 0 additions & 36 deletions .github/workflows/push-check.yml

This file was deleted.

Loading