1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-11 16:38:55 +00:00

Add automatic labeling for issues (#2057)

* Change labeler action provider
* Add labels for issue content matches

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
This commit is contained in:
Tin Švagelj 2024-10-11 10:56:28 +00:00 committed by GitHub
parent ebef88015a
commit 184af03d7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 357 additions and 203 deletions

547
.github/labeler.yml vendored
View File

@ -1,216 +1,375 @@
documentation: version: 1
- changed-files: appendOnly: true
- any-glob-to-any-file:
- doc/*
- doc/**/*
- data/conky*.conf
extras: labels:
- changed-files: - label: 'enhancement'
- any-glob-to-any-file: type: 'issue'
- extras/* body: "([Ee]nhance(d|ment)|[Ii]mprove(ment|d))"
- extras/**/* - label: 'enhancement'
type: 'issue'
title: "([Ee]nhance(d|ment)|[Ii]mprove(ment|d))"
- label: 'feature'
type: 'issue'
title: "([Ff]eature|[Ss]uggestion)"
- label: 'packaging'
type: 'issue'
body: "([Pp]ackage|AUR)"
- label: 'question'
type: 'issue'
body: "([Ww](ondering|ant(ed)? to ask|ould like to (know|understand)))"
sources: - label: 'priority: low'
- changed-files: type: 'issue'
- any-glob-to-any-file: body: "low priority"
- src/*
- src/**/*
tests: - label: 'display: console'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- tests/**/* - src/display-console.cc
- tests/* - src/display-console.hh
- label: 'display: file'
type: 'pull_request'
files:
- src/display-file.cc
- src/display-file.hh
- label: 'display: http'
type: 'pull_request'
files:
- src/display-http.cc
- src/display-http.hh
- label: 'display: ncurses'
type: 'pull_request'
files:
- src/nc.cc
- src/nc.h
- src/display-ncurses.cc
- src/display-ncurses.hh
- label: 'display: wayland'
type: 'pull_request'
files:
- src/wl.cc
- src/wl.h
- src/wlr-layer-shell-unstable-v1.xml
- src/display-wayland.cc
- src/display-wayland.hh
- label: 'display: wayland'
type: 'issue'
title: "[Ww]ayland"
web: - label: 'display: x11'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- web/* - src/x11-color.cc
- web/**/* - src/x11-color.h
- src/x11.cc
- src/x11.h
- src/display-x11.cc
- src/display-x11.hh
- label: 'display: x11'
type: 'issue'
title: "[Xx]11"
appimage: - label: 'os: linux'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- appimage/* - src/linux.cc
- appimage/**/* - src/linux.h
- label: 'os: linux'
type: 'issue'
title: "[Ll]inux"
- label: 'os: dragonfly'
type: 'pull_request'
files:
- src/dragonfly.cc
- src/dragonfly.h
- label: 'os: dragonfly'
type: 'issue'
body: "[Dd]ragon[Ff]ly"
- label: 'os: freebsd'
type: 'pull_request'
files:
- src/freebsd.cc
- src/freebsd.h
- label: 'os: dragonfly'
type: 'issue'
body: "[Ff]ree\\s?(BSD|bsd)"
- label: 'os: netbsd'
type: 'pull_request'
files:
- src/netbsd.cc
- src/netbsd.h
- label: 'os: netbsd'
type: 'issue'
body: "[Nn]et\\s?(BSD|bsd)"
- label: 'os: openbsd'
type: 'pull_request'
files:
- src/openbsd.cc
- src/openbsd.h
- label: 'os: openbsd'
type: 'issue'
body: "[Oo]pen\\s?(BSD|bsd)"
- label: 'os: solaris'
type: 'pull_request'
files:
- src/solaris.cc
- src/solaris.h
- label: 'os: solaris'
type: 'issue'
body: "[Ss](olaris|OLARIS)"
- label: 'os: haiku'
type: 'pull_request'
files:
- src/haiku.cc
- src/haiku.h
- label: 'os: haiku'
type: 'issue'
body: "[Hh](aiku|AIKU)"
3rdparty: - label: 'documentation'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- 3rdparty/* - doc/*
- 3rdparty/**/* - doc/**/*
- data/conky*.conf
- label: 'documentation'
type: 'issue'
title: "[Dd]ocument(ation)?" # can be mentioned but unrelated
gh-actions: - label: 'extras'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- .github/workflows/* - extras/*
- .github/workflows/**/* - extras/**/*
- .github/labeler.yml
- .github/pull_request_template.md
dependencies: - label: 'sources'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- web/package-lock.json - src/*
- cmake/ConkyPlatformChecks.cmake - src/**/*
audio: - label: 'tests'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/audacious.cc - tests/**/*
- src/audacious.h - tests/*
- src/cmus.cc
- src/cmus.h
- src/libmpdclient.cc
- src/libmpdclient.h
- src/mpd.cc
- src/mpd.h
- src/moc.cc
- src/moc.h
- src/mixer.cc
- src/mixer.h
- src/xmms2.cc
- src/xmms2.h
- src/pulseaudio.cc
- src/pulseaudio.h
power: - label: 'web'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/apcupsd.cc - web/*
- src/apcupsd.h - web/**/*
- src/bsdapm.cc
- src/bsdapm.h
- src/smapi.cc
- src/smapi.h
'display: console': - label: 'appimage'
- changed-files: type: 'issue'
- any-glob-to-any-file: body: "(appimage|AppImage|Appimage)"
- src/display-console.cc
- src/display-console.hh
'display: file':
- changed-files:
- any-glob-to-any-file:
- src/display-file.cc
- src/display-file.hh
'display: http':
- changed-files:
- any-glob-to-any-file:
- src/display-http.cc
- src/display-http.hh
'display: ncurses':
- changed-files:
- any-glob-to-any-file:
- src/nc.cc
- src/nc.h
- src/display-ncurses.cc
- src/display-ncurses.hh
'display: wayland':
- changed-files:
- any-glob-to-any-file:
- src/wl.cc
- src/wl.h
- src/wlr-layer-shell-unstable-v1.xml
- src/display-wayland.cc
- src/display-wayland.hh
'display: x11':
- changed-files:
- any-glob-to-any-file:
- src/x11-color.cc
- src/x11-color.h
- src/x11.cc
- src/x11.h
- src/display-x11.cc
- src/display-x11.hh
'build system': - label: '3rdparty'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- '**/CMakeLists.txt' - 3rdparty/*
- '*.cmake' - 3rdparty/**/*
cairo: - label: 'gh-actions'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- 'lua/*cairo*' - .github/workflows/*
- .github/workflows/**/*
- .github/labeler.yml
- .github/pull_request_template.md
'disk io': - label: 'dependencies'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/diskio.cc - web/package-lock.json
- src/diskio.h - cmake/ConkyPlatformChecks.cmake
cpu: - label: 'appimage'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/cpu.cc - appimage/*
- src/cpu.h - appimage/**/*
- src/proc.cc
- src/proc.h
- src/top.cc
- src/top.h
lua: - label: 'audio'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- lua/* - src/audacious.cc
- lua/**/* - src/audacious.h
- src/llua.cc - src/cmus.cc
- src/llua.h - src/cmus.h
- src/luamm.cc - src/libmpdclient.cc
- src/luamm.h - src/libmpdclient.h
- src/lua-config.cc - src/mpd.cc
- src/lua-config.hh - src/mpd.h
- src/moc.cc
- src/moc.h
- src/mixer.cc
- src/mixer.h
- src/xmms2.cc
- src/xmms2.h
- src/pulseaudio.cc
- src/pulseaudio.h
- label: 'audio'
type: 'issue'
title: "([Aa]udio|[Aa]udacious|CMUS|cmus|MPD|libmpd|[Mm]ixer|xmms2|XMMS2|[Pp]ulse[Aa]udio|[Mm]usic|[Ss]ong)" # can be in config
macos: - label: 'power'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/darwin_sip.h - src/apcupsd.cc
- src/darwin.h - src/apcupsd.h
- src/darwin.mm - src/bsdapm.cc
- src/bsdapm.h
- src/smapi.cc
- src/smapi.h
- label: 'power'
type: 'issue'
title: "([Bb]attery|[Cc]harged)" # can be in config
'mouse events': - label: 'build system'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/scroll.cc - '**/CMakeLists.txt'
- src/scroll.h - '*.cmake'
- src/mouse-events.cc
- src/mouse-events.h
networking: - label: 'cairo'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/net_stat.cc - 'lua/*cairo*'
- src/net_stat.h - label: 'cairo'
- src/tcp-portmon.cc type: 'issue'
- src/tcp-portmon.h title: "([Cc]airo)" # can be in config
- src/read_tcpip.cc
- src/read_tcpip.h
nvidia: - label: 'sensors'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/nvidia.cc - src/hddtemp.cc
- src/nvidia.h - src/hddtemp.h
- label: 'disk io'
type: 'issue'
title: "(temperature|temp)" # can be in config
rendering: - label: 'disk io'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/text_object.cc - src/diskio.cc
- src/text_object.h - src/diskio.h
- src/specials.cc - label: 'disk io'
- src/specials.h type: 'issue'
title: "(HDD|hdd|SSD|ssd|[Dd](isk|rive) space|filesystem)" # can be in config
text: - label: 'cpu'
- changed-files: type: 'pull_request'
- any-glob-to-any-file: files:
- src/text_object.cc - src/cpu.cc
- src/text_object.h - src/cpu.h
- src/template.cc - src/proc.cc
- src/template.h - src/proc.h
- src/tailhead.cc - src/top.cc
- src/tailhead.h - src/top.h
- src/specials.cc - label: 'cpu'
- src/specials.h type: 'issue'
title: "(CPU|cpu)" # can be in config
- label: 'lua'
type: 'pull_request'
files:
- lua/*
- lua/**/*
- src/llua.cc
- src/llua.h
- src/luamm.cc
- src/luamm.h
- src/lua-config.cc
- src/lua-config.hh
- label: 'lua'
type: 'issue'
title: "[Ll](ua|UA)" # can be in config
- label: 'mail'
type: 'pull_request'
files:
- src/mail.cc
- src/mail.h
- src/mboxscan.cc
- src/mboxscan.h
- label: 'mail'
type: 'issue'
title: "(e?mail|[Mm][Bb](ox|OX))" # can be in config
- label: 'mouse events'
type: 'pull_request'
files:
- src/scroll.cc
- src/scroll.h
- src/mouse-events.cc
- src/mouse-events.h
- label: 'mouse events'
type: 'issue'
body: "(mouse|cursor|pointer) (buttons?|events?|enters?|leaves?|clicks?|press(es)?))"
- label: 'networking'
type: 'pull_request'
files:
- src/net_stat.cc
- src/net_stat.h
- src/tcp-portmon.cc
- src/tcp-portmon.h
- src/read_tcpip.cc
- src/read_tcpip.h
- label: 'networking'
type: 'issue'
title: "(network( (interface|id|ID))|(IP|machine|gateway)('?s)? address|download|upload|gateway)" # can be in config
- label: 'nvidia'
type: 'pull_request'
files:
- src/nvidia.cc
- src/nvidia.h
- label: 'nvidia'
type: 'issue'
title: "[Nn](vidia|VIDIA)" # can be in config
- label: 'rendering'
type: 'pull_request'
files:
- src/text_object.cc
- src/text_object.h
- src/specials.cc
- src/specials.h
- label: 'rendering'
type: 'issue'
title: "([Xx](ft|FT))"
- label: 'rendering'
type: 'issue'
body: "(incorrect|bad|wrong)(ly)? (size|align|position)(ed|ment)"
- label: 'rendering'
type: 'issue'
body: "(flicker(ing)?|font icons?|[Xx](ft|FT))"
- label: 'text'
type: 'pull_request'
files:
- src/core.cc
- src/core.h
- src/text_object.cc
- src/text_object.h
- src/template.cc
- src/template.h
- src/tailhead.cc
- src/tailhead.h
- src/specials.cc
- src/specials.h
- label: 'text'
type: 'issue'
body: "exec(i(bar))"
- label: 'text'
type: 'issue'
body: "\\$\\w+ variable"
- label: 'build system'
type: 'issue'
title: "([Cc]?[Cc][Mm]ake|([Mm]ake|[Bb]uild) error|compil(e|ation))"
- label: 'build system'
type: 'issue'
body: "([Cc]?[Cc][Mm]ake|([Mm]ake|[Bb]uild) error|compil(e|ation))"

View File

@ -1,18 +1,13 @@
name: 'Pull Request Labeler' name: 'Pull Request Labeler'
on: on:
- pull_request_target - pull_request_target
- issues
jobs: jobs:
triage: triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run labeler - name: Run labeler
uses: actions/labeler@v5 uses: srvaroa/labeler@v1
with: env:
sync-labels: true GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
repo-token: '${{ secrets.GITHUB_TOKEN }}'