github: switch issue-labeller to bot webhook and add configuration

Remove the standalone GitHub Actions issue-labeller.yml workflow in favor
of the webhook-based openwrt-bot worker.

Enable issue labeller in formalities.json and add a declarative
.github/issue-labeller.yml configuration file for automated validation
and labelling of bug reports (release, target, image kind, device).

The release rule lists two alternative conditions under a single label
key: concrete releases (x.y.z, x.y.z-rcN) are validated against their
Git tag via exists check, while stable-branch snapshots (x.y-SNAPSHOT)
are format-validated only — OpenWrt does not tag snapshot builds.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24382
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Josef Schlehofer 2026-07-23 11:27:39 +02:00 committed by Christian Marangi
parent 3b2bc55dcb
commit 69668f8f82
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7
3 changed files with 45 additions and 12 deletions

View file

@ -25,5 +25,6 @@
"check_pkg_release": "warning",
"require_linked_github_account": "warning",
"enable_stale_bot": false,
"enable_labeler_yml": true
"enable_labeler_yml": true,
"enable_issue_labeller": true
}

43
.github/issue-labeller.yml vendored Normal file
View file

@ -0,0 +1,43 @@
# Configuration for OpenWrt Issue Labeller
# Automates issue form validation and labelling via openwrt-bot webhook.
_trigger_label: "to-triage"
_invalid_label: "invalid"
_remove_labels: ["to-triage"]
_invalid_comment: "Invalid {field} reported. `{value}`"
# Tag release branch (e.g. release/23.05 or release/24.10).
# The list items are alternatives: concrete releases (24.10.7, 25.12.0-rc2)
# must have a matching Git tag, while stable-branch snapshots (24.10-SNAPSHOT)
# are format-validated only — OpenWrt does not tag snapshot builds.
"release/{major}.{minor}":
- field: "release"
format: '^\d+\.\d+\.\d+(-rc\d+)*$'
exists: "tag:v{value}"
- field: "release"
format: '^\d+\.\d+-SNAPSHOT$'
# Tag development snapshot release
"SNAPSHOT":
- field: "release"
format: '^SNAPSHOT$'
# Tag target (e.g. target/x86, target/ath79, target/ramips)
"target/{segment0}":
- field: "target"
format: '^[a-zA-Z0-9]+/[a-zA-Z0-9]+$'
exists: "path:target/linux/{segment0}/{segment1}"
# Tag image source
"Official Image":
- field: "image_kind"
contains: "official"
"Self Built Image":
- field: "image_kind"
contains: "self"
# Tag supported device
"Supported Device":
- field: "device"
not_empty: true

View file

@ -1,11 +0,0 @@
name: Issue Labeller
on:
issues:
types: [ opened ]
jobs:
label-component:
name: Validate and Tag Bug Report
permissions:
issues: write
uses: openwrt/actions-shared-workflows/.github/workflows/issue-labeller.yml@main