Skip to content

[Bug] PR quality-gates regex incorrectly patterns fixe[sd] — intent is unclear and fragile #711

Description

@RUKAYAT-CODER

Overview

.github/workflows/pr-quality-gates.yml line 23 contains a regex meant to match PR closing keywords (close, fix, resolve and their variants). The pattern fix(e[sd])? is confusing and diverges from standard GitHub closing keyword syntax. A simpler, explicit alternation removes ambiguity and ensures all documented variants are matched correctly.

Specifications

Features:

  • PR body regex reliably matches all documented linking keywords: close, closes, closed, fix, fixed, fixes, resolve, resolves, resolved

Tasks:

  • Replace the current regex with an explicit alternation: (close[sd]?|fix(ed|es)?|resolve[sd]?)\s+#\d+
  • Add test cases validating each keyword variant against the pattern
  • Document the expected keyword format in CONTRIBUTING.md

Impacted Files:

  • .github/workflows/pr-quality-gates.yml
  • CONTRIBUTING.md

Acceptance Criteria

  • All nine documented closing keywords are matched correctly
  • PRs without an issue reference are blocked
  • PRs with any valid keyword + issue number pass the gate

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions