Skip to content

Conversation

@jlogeart
Copy link
Contributor

@jlogeart jlogeart commented Nov 13, 2025

Resolves FDN-4209

This PR adds the pr-validator workflow to ensure PRs have associated JIRA tickets.

Summary by CodeRabbit

  • Chores
    • Added automated pull request title validation to enforce consistent naming conventions and prevent invalid submissions.

Copilot AI review requested due to automatic review settings November 13, 2025 21:11
@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow is introduced to validate pull request titles against a Jira-like pattern. The workflow triggers on pull request events and uses a script to enforce that PR titles begin with at least three uppercase letters, followed by a hyphen and a 3- to 6-digit number.

Changes

Cohort / File(s) Summary
GitHub Actions PR Validation Workflow
\.github/workflows/pr-validator\.yml
New workflow added to validate PR title format using actions/github-script@v4. Enforces Jira-like naming convention (e.g., ABC-12345) with pattern matching and descriptive error messaging.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the regex pattern correctly validates Jira-like ticket identifiers (3+ uppercase letters, hyphen, 3-6 digit number)
  • Confirm the error message is clear and actionable for contributors
  • Check that workflow triggers are appropriate (opened, edited, synchronize events)

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'FDN-4209 Update pr-validator workflow' clearly and accurately summarizes the main change: adding/updating a PR validator workflow, which matches the file added (.github/workflows/pr-validator.yml) and the PR's stated objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a GitHub Actions workflow to enforce JIRA ticket references in pull request titles. The workflow validates that PR titles begin with a properly formatted JIRA ticket identifier.

  • Adds automated PR validation for JIRA ticket format compliance
  • Implements regex-based validation requiring 3+ uppercase letters, followed by 3-6 digit numbers (excluding all-zero patterns)
  • Configured to run on PR open, edit, and synchronize events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e2027d and aca6f7a.

📒 Files selected for processing (1)
  • .github/workflows/pr-validator.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/pr-validator.yml

11-11: the runner of "actions/github-script@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Jenkins
🔇 Additional comments (2)
.github/workflows/pr-validator.yml (2)

1-4: LGTM: Workflow triggers are appropriately configured.

The event types (opened, edited, synchronize) correctly capture scenarios where PR validation should run: new PRs, title/description edits, and new commits.


14-36: LGTM: PR title validation logic is sound.

The regex pattern correctly enforces the JIRA ticket format (3+ uppercase letters, hyphen, 3–6 digits, excluding all-zero numbers), and the error message provides clear guidance to developers. The use of core.setFailed() ensures workflow failure on invalid titles.

Copy link
Contributor

@mikeclimbrock mikeclimbrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jlogeart jlogeart merged commit 0e4eeff into main Nov 14, 2025
14 checks passed
@jlogeart jlogeart deleted the FDN-4209-add-pr-validator-workflow branch November 14, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants