Skip to content

feat(ci): require a Jira reference on pull requests targeting integration branches - #6468

Merged
kduret merged 1 commit into
developfrom
MON-208667-enforce-jira-reference-on-prs
Sep 30, 2026
Merged

kduret merged 1 commit into
developfrom
MON-208667-enforce-jira-reference-on-prs

Conversation

@kduret

@kduret kduret commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Centreon team (internal PR)

Description

Fixes: MON-208667

Port of centreon/centreon#11840.

Adds a check-jira-reference job to the check-status workflow: pull requests targeting develop, release-* or hotfix-* must reference a Jira issue key (any project, for example MON-12345) in their branch name or description. When no key is found, the job fails and posts an actionable comment in the pull request (a single comment updated in place).

  • community pull requests from forks are exempted (they carry no Jira ticket), as well as automated pull requests (Bot accounts and technique-ci);
  • label skip-jira-reference skips the check; like skip-cherry-pick, it is read from the labels output of get-environment, which now also runs for pull requests targeting develop;
  • the check-status job is unchanged; to block the merge, check-jira-reference must be added as a required status check;
  • the workflow triggers are unchanged: after fixing the description (or adding the label), re-run all jobs of check-status.

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

  • This pull request exercises the job: the branch name contains MON-208667, so check-jira-reference passes.
  • On an internal pull request targeting develop whose branch name and description contain no Jira key, check-jira-reference fails and a comment explains what to add; after adding a key to the description and re-running all jobs of check-status, it passes and the comment is updated.
  • On a pull request from a fork, or with label skip-jira-reference, the job is skipped.

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (develop).
  • In case of a new plugin, I have created the new packaging directory accordingly.
  • I have implemented automated tests related to my commits.
    • Data used for automated tests are anonymized.
  • I have reviewed all the help messages in all the .pm files I have modified.
    • All sentences begin with a capital letter.
    • All sentences end with a period.
    • I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
  • After having created the PR, I will make sure that all the tests provided in this PR have run and passed.

…tion branches

Port of centreon/centreon#11840: fail when neither the branch name nor the description of a pull request targeting develop, release-* or hotfix-* contains a Jira issue key, and explain the fix in a pull request comment. Automated dependency pull requests, community pull requests from forks and label skip-jira-reference are exempted.

Refs: MON-208667
@kduret
kduret marked this pull request as ready for review September 30, 2026 12:45
@kduret
kduret requested a review from a team as a code owner September 30, 2026 12:45
@kduret
kduret requested review from Tpo76 and mushroomempires and removed request for a team September 30, 2026 12:45
@kduret
kduret merged commit 464df0b into develop Sep 30, 2026
10 checks passed
@kduret
kduret deleted the MON-208667-enforce-jira-reference-on-prs branch September 30, 2026 13:25
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