ci: Introduce HPX PR Sentinel (Automated Rule-Based Review & Labeling Bot)#7207
ci: Introduce HPX PR Sentinel (Automated Rule-Based Review & Labeling Bot)#7207arpittkhandelwal wants to merge 1 commit intoTheHPXProject:masterfrom
Conversation
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Pull request overview
Introduces an automated “HPX PR Sentinel” GitHub Actions workflow to label PRs and post/update a single rule-based review comment to improve contributor guidance and maintainer triage.
Changes:
- Added a
pull_request_targetworkflow that runsactions/labelerand anactions/github-scriptrules engine to comment on PR hygiene (title format, WIP, size, tests, changelog, etc.). - Added
.github/labeler.ymlwith path-based label rules for common areas (cmake, docs, core/full, tests, examples, GitHub actions).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| .github/workflows/hpx-pr-bot.yml | New PR bot workflow that labels PRs and posts/updates an automated review comment based on heuristic checks. |
| .github/labeler.yml | New labeler configuration mapping changed paths to standard labels. |
87f3ed7 to
b2bd93e
Compare
|
pushed an update to fix all the issues raised by Copilot and the security scanner. The security alert was actually a false positive triggered by the emojis in the script (it flags invisible unicode characters as a Trojan Source risk), so I've stripped all emojis and replaced them with standard bracket formatting like [!] and [+]. I also applied all the fixes Copilot suggested: Added a concurrency block so multiple pushes don't step on each other. |
|
@hkaiser sir could you please review this PR when you get a chance? Thanks! |
| # SPDX-License-Identifier: BSL-1.0 | ||
| # Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
| cmake: |
There was a problem hiding this comment.
Are these the names of the labels that will be created? If yes, please align with the existing label names (like category: cmake) or similar.
| github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
| script: | | ||
| const pr = context.payload.pull_request; | ||
| const botSign = `\n\n---\n*Beep Boop! I am the **HPX PR Sentinel**!*\n*I automatically review pull requests to keep HPX fast and reliable!*`; |
There was a problem hiding this comment.
Heh, let's keep it professional (i.e. no Beep Boop! please).
|
@arpittkhandelwal I'm not sure if this kind of hand-holding isn't too restrictive and would put people off rather than encouraging them to follow certain rules (and I'm not sure if this can be done in an automated way to begin with). I'd like to hear what others say to this before making a decision, though. Perhaps starting a discussion on Discord may give us more feedback. |
Description
This Pull Request introduces the HPX PR Sentinel, an automated rule-based GitHub Action designed to improve contributor experience and streamline the code review process for maintainers.
The bot is entirely native to GitHub Actions (no external LLM or API dependencies) and uses
actions/github-scriptalongsideactions/labeler.🚀 Sentinel Features
The HPX PR Sentinel automatically runs on the
pull_request_targetevent and performs the following checks:1. Automated File Labeling
actions/labeler@v5to apply standard labels (likecmake,documentation,core,full,tests,github-actions, etc.) purely based on the file paths modified in the PR.2. Maintainer Acknowledgment
opened.3. First-Time Contributor Welcome
FIRST_TIME_CONTRIBUTORorNONE.4. Title Formatting Check
feat:,fix:,docs:).5. Work In Progress (WIP) Warning
6. Description Length Check
7. Massive PR Alert (Titan Check)
8. Missing Tests Reminder
*.cppor*.hppfiles but does not touch any files inside the/testsfolder.9. Changelog Enforcer
CHANGELOGorRELEASE_NOTESare updated.10. Branch Naming Checker
main,master, orpatch-1).feature/my-new-idea).11. Merge Conflict Watcher
pr.mergeableis evaluated as exactlyfalse.12. Documentation Praise
*.mdfiles or thedocs/folder.