Skip to content

Conversation

@aHenryJard
Copy link
Member

@aHenryJard aHenryJard commented Jan 2, 2026

Proposed changes

  • Add a very permissive regexpr to check PR title.

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@github-actions github-actions bot added the filigran team use to identify PR from the Filigran team label Jan 2, 2026
@aHenryJard aHenryJard changed the title Test a PR title check [ci] Add automated PR title check (#13867) Jan 2, 2026
@aHenryJard aHenryJard changed the title [ci] Add automated PR title check (#13867) [ci] Add automated PR title check Jan 2, 2026
@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31.11%. Comparing base (aa7bae1) to head (4314aeb).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13868   +/-   ##
=======================================
  Coverage   31.11%   31.11%           
=======================================
  Files        2920     2920           
  Lines      193545   193545           
  Branches    39497    39499    +2     
=======================================
+ Hits        60221    60227    +6     
+ Misses     133324   133318    -6     
Flag Coverage Δ
opencti 31.11% <ø> (+<0.01%) ⬆️
opencti-front 2.49% <ø> (+<0.01%) ⬆️
opencti-graphql 68.55% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aHenryJard aHenryJard changed the title [ci] Add automated PR title check [ci] Add automated PR title check2 Jan 2, 2026
@aHenryJard aHenryJard changed the title [ci] Add automated PR title check2 [ci] Add automated PR title check (#13867) Jan 2, 2026
@aHenryJard aHenryJard marked this pull request as ready for review January 2, 2026 10:08
@aHenryJard aHenryJard marked this pull request as draft January 2, 2026 10:24
@SamuelHassine SamuelHassine force-pushed the master branch 8 times, most recently from 1c222ef to 2cb4539 Compare January 10, 2026 19:59
Copy link
Contributor

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 adds automated validation of pull request titles using a GitHub Actions workflow. The workflow enforces that PR titles follow the format [component] Message (#issuenumber) as specified in the CONTRIBUTING.md file.

Changes:

  • Adds a new GitHub Actions workflow that triggers on PR open/edit events
  • Uses the Slashgear/action-check-pr-title action to validate PR title format
  • Provides a help message pointing to contribution guidelines

steps:
- uses: Slashgear/action-check-pr-title@161cede0311ec624ae3ee76a2c27522f7b6fa2d8
with:
regexp: "[[a-z]]+.+(#[0-9]+)"
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

The regex pattern has incorrect syntax. [[a-z]] should be \[[a-z] to match a literal opening bracket followed by lowercase letters. The pattern also doesn't match the closing bracket or validate the full format. A correct pattern would be: ^\[([a-z\-]+)\]\s+.+\s+\(#[0-9]+\)$ to match [component] Message (#issuenumber). The current pattern would incorrectly accept strings like [abc.

Suggested change
regexp: "[[a-z]]+.+(#[0-9]+)"
regexp: "^\\[([a-z\\-]+)\\]\\s+.+\\s+\\(#[0-9]+\\)$"

Copilot uses AI. Check for mistakes.

jobs:
check-pr-title-convention:
name: Check that title follow convention
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Grammatical error in workflow step name. Should be 'follows' instead of 'follow' to match subject-verb agreement.

Suggested change
name: Check that title follow convention
name: Check that title follows convention

Copilot uses AI. Check for mistakes.
Comment on lines +5 to +6
pull_request_target:
types: [opened, edited]
Copy link

Copilot AI Jan 14, 2026

Choose a reason for hiding this comment

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

Using pull_request_target trigger can be a security risk as it runs in the context of the base repository with access to secrets, even for PRs from forks. While the current permissions are set to contents: read which limits the risk, this trigger should only be used when necessary. Since this workflow doesn't need to post comments or access secrets (it just validates the title), using only pull_request trigger should be sufficient. If pull_request_target is needed for fork PRs, ensure this is intentional and documented.

Suggested change
pull_request_target:
types: [opened, edited]

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically check PR title with contributing.md format

2 participants