Currently, the @wildfly-bot[bot] skip format command in a PR body skips both format checks (title, commit message, description validation) and rule checks (should be probably named as rule actions) (label assignment, reviewer notifications, CC mentions).
These are fundamentally different concerns and should be controllable independently.
Additionally, there is no config-level mechanism to conditionally disable format checks based on PR content.
So my proposals are:
- Remove the
@wildfly-bot skip format bot command -- its not even documented, and its use is rather cumbersome.
- Refactor "skip" logic to separate format checks from rule actions -- with that also rename rule checks to rule actions.
- Add a new config field for disabling format checks via regex:
- Add a new field(s) under
wildfly.format that accepts a case-insensitive regex matched against the PR description. When matched, format checks are skipped but rule actions still run.
PoC example of a YAML config file (see skip field):
wildfly:
projectKey: "WFLY"
format:
skip: # checks description for the regex pattern(s) -- disjunction
- "No JIRA required"
- "No JIRA needed"
- "No issue required"
title:
# enabled: true (default)
failMessage: "PR title must reference a JIRA issue"
commit:
# enabled: true (default)
failMessage: "At least one commit must reference a JIRA issue"
description:
failMessage: "The PR description is not correct"
regexes:
- pattern: "https://redhat.atlassian.net/browse/WFLY-\\d+"
failMessage: "The PR description must contain a link to the JIRA issue"
# ... some other patterns
n.b. I also renamed message to failMessage, to be more explicit.
For more info, see Zulip thread: https://wildfly.zulipchat.com/#narrow/channel/174184-wildfly-developers/topic/WildFly.20Bot.20.E2.80.93.20format.20check.20failed.20based.20on.20incorrect.20premise/with/607149523
Currently, the
@wildfly-bot[bot] skip formatcommand in a PR body skips both format checks (title, commit message, description validation) and rule checks (should be probably named as rule actions) (label assignment, reviewer notifications, CC mentions).These are fundamentally different concerns and should be controllable independently.
Additionally, there is no config-level mechanism to conditionally disable format checks based on PR content.
So my proposals are:
@wildfly-bot skipformat bot command --its not even documented, and its use is rather cumbersome.wildfly.formatthat accepts a case-insensitive regex matched against the PR description. When matched, format checks are skipped but rule actions still run.PoC example of a YAML config file (see
skipfield):n.b. I also renamed
messagetofailMessage, to be more explicit.For more info, see Zulip thread: https://wildfly.zulipchat.com/#narrow/channel/174184-wildfly-developers/topic/WildFly.20Bot.20.E2.80.93.20format.20check.20failed.20based.20on.20incorrect.20premise/with/607149523