CI: migrate to webhook bot and simplify labeler

This commit migrates the repository validation to a webhook-based bot instead of the GitHub Actions workflow (.github/workflows/formal.yml).

Since the bot handles stable branch labeling automatically (via the "branch_labeling: true" configuration option), the redundant branch check and labeling steps are removed from .github/workflows/labeler.yml.

The following configuration choices are applied in formalities.json:
- check_space_after_assignment: false (Disabled temporarily to catch any issues since it is a newly implemented check)
- check_makefile_indentation: false (Disabled temporarily to catch any issues since it is a new feature)
- check_patch_headers: 'warning' (Changed to warning instead of hard error since many legacy patches lack headers)
- enable_stale_bot: false (Disabled for now)

Other configurations can be adjusted in formalities.json based on the openwrt-bot-worker repository [1].

[1] https://github.com/openwrt/openwrt-bot-worker

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24256
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Josef Schlehofer
2026-07-18 12:34:33 +02:00
committed by Christian Marangi
parent e92d07b113
commit 9146f931b6
3 changed files with 28 additions and 32 deletions
+28
View File
@@ -0,0 +1,28 @@
{
"check_branch": true,
"check_merge_commits": true,
"check_noreply_email": true,
"check_signoff": true,
"check_signature": true,
"allow_autosquash": true,
"enable_comments": true,
"max_subject_len_soft": 60,
"max_subject_len_hard": 80,
"max_body_line_len": 100,
"warn_duplicate_body": true,
"warn_generic_subjects": true,
"require_release_notes": true,
"check_pkg_version": true,
"check_crlf": true,
"add_package_label": true,
"drop_package_label": true,
"branch_labeling": true,
"check_openwrt_meta": true,
"check_conffiles": true,
"check_patch_headers": "warning",
"check_space_after_assignment": false,
"check_makefile_indentation": false,
"check_pkg_release": "warning",
"require_linked_github_account": true,
"enable_stale_bot": false
}
-18
View File
@@ -1,18 +0,0 @@
name: Test Formalities
on:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
build:
name: Test Formalities
uses: openwrt/actions-shared-workflows/.github/workflows/formal.yml@main
# with:
# # Post formality check summaries to the PR.
# # Repo's permissions need to be updated for actions to modify PRs:
# # https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28#create-an-issue-comment
# post_comment: true
-14
View File
@@ -17,17 +17,3 @@ jobs:
- uses: actions/labeler@v6
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Check Branch
id: check-branch
run: |
if echo "${{ github.base_ref }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
echo "release-tag=$(echo ${{ github.base_ref }} | sed 's/openwrt-/release\//')" >> $GITHUB_OUTPUT
fi
- uses: buildsville/add-remove-label@v2.0.1
if: ${{ steps.check-branch.outputs.release-tag }}
with:
token: ${{secrets.GITHUB_TOKEN}}
labels: ${{ steps.check-branch.outputs.release-tag }}
type: add