ci: add conventional PR title bot for automated feedback#1767
ci: add conventional PR title bot for automated feedback#1767exploreriii merged 1 commit intohiero-ledger:mainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a new GitHub Actions bot script that analyzes PR titles for conventional-commit types, formats guidance messages, and posts or updates comments on PRs. Updates the PR title check workflow to invoke the script (with dry-run support) and posts guidance when the title check fails. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub REST API
GitHub->>Workflow: PR event or workflow_dispatch
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(prTitle, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/{prNumber}/comments (paginated)
activate API
API-->>BotScript: comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/{commentId}
else No existing comment
BotScript->>API: POST /repos/.../issues/{prNumber}/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: finished
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
WalkthroughIntroduces a new GitHub Actions bot script that analyzes PR titles for conventional commit compliance, suggests improvements via keyword-based type detection, and automatically comments on PRs with helpful guidance. Updates the corresponding workflow to integrate the bot and provide user-friendly correction instructions. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub API
GitHub->>Workflow: PR event triggered
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(title, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/prNumber/comments
activate API
API-->>BotScript: paginated comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/commentId
else No existing comment
BotScript->>API: POST /repos/.../issues/prNumber/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: success
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2 similar comments
WalkthroughIntroduces a new GitHub Actions bot script that analyzes PR titles for conventional commit compliance, suggests improvements via keyword-based type detection, and automatically comments on PRs with helpful guidance. Updates the corresponding workflow to integrate the bot and provide user-friendly correction instructions. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub API
GitHub->>Workflow: PR event triggered
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(title, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/prNumber/comments
activate API
API-->>BotScript: paginated comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/commentId
else No existing comment
BotScript->>API: POST /repos/.../issues/prNumber/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: success
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
WalkthroughIntroduces a new GitHub Actions bot script that analyzes PR titles for conventional commit compliance, suggests improvements via keyword-based type detection, and automatically comments on PRs with helpful guidance. Updates the corresponding workflow to integrate the bot and provide user-friendly correction instructions. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub API
GitHub->>Workflow: PR event triggered
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(title, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/prNumber/comments
activate API
API-->>BotScript: paginated comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/commentId
else No existing comment
BotScript->>API: POST /repos/.../issues/prNumber/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: success
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Review failedFailed to post review comments WalkthroughIntroduces a new GitHub Actions bot script that analyzes PR titles for conventional commit compliance, suggests improvements via keyword-based type detection, and automatically comments on PRs with helpful guidance. Updates the corresponding workflow to integrate the bot and provide user-friendly correction instructions. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub API
GitHub->>Workflow: PR event triggered
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(title, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/prNumber/comments
activate API
API-->>BotScript: paginated comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/commentId
else No existing comment
BotScript->>API: POST /repos/.../issues/prNumber/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: success
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 similar comments
|
Caution Review failedFailed to post review comments WalkthroughIntroduces a new GitHub Actions bot script that analyzes PR titles for conventional commit compliance, suggests improvements via keyword-based type detection, and automatically comments on PRs with helpful guidance. Updates the corresponding workflow to integrate the bot and provide user-friendly correction instructions. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub API
GitHub->>Workflow: PR event triggered
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(title, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/prNumber/comments
activate API
API-->>BotScript: paginated comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/commentId
else No existing comment
BotScript->>API: POST /repos/.../issues/prNumber/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: success
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Review failedFailed to post review comments WalkthroughIntroduces a new GitHub Actions bot script that analyzes PR titles for conventional commit compliance, suggests improvements via keyword-based type detection, and automatically comments on PRs with helpful guidance. Updates the corresponding workflow to integrate the bot and provide user-friendly correction instructions. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub API
GitHub->>Workflow: PR event triggered
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(title, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/prNumber/comments
activate API
API-->>BotScript: paginated comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/commentId
else No existing comment
BotScript->>API: POST /repos/.../issues/prNumber/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: success
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Review failedFailed to post review comments WalkthroughIntroduces a new GitHub Actions bot script that analyzes PR titles for conventional commit compliance, suggests improvements via keyword-based type detection, and automatically comments on PRs with helpful guidance. Updates the corresponding workflow to integrate the bot and provide user-friendly correction instructions. Changes
Sequence DiagramsequenceDiagram
participant GitHub as GitHub
participant Workflow as GitHub Actions Workflow
participant BotScript as Bot Script
participant API as GitHub API
GitHub->>Workflow: PR event triggered
activate Workflow
Workflow->>BotScript: run(github, context, prNumber, prTitle, dryRun)
activate BotScript
BotScript->>BotScript: suggestConventionalType(prTitle)
BotScript->>BotScript: formatMessage(title, suggestedType, prNumber)
BotScript->>API: GET /repos/.../issues/prNumber/comments
activate API
API-->>BotScript: paginated comments list
deactivate API
alt Existing bot comment found
BotScript->>API: PATCH /repos/.../comments/commentId
else No existing comment
BotScript->>API: POST /repos/.../issues/prNumber/comments
end
activate API
API-->>BotScript: comment created/updated
deactivate API
BotScript-->>Workflow: success
deactivate BotScript
deactivate Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi, this is MergeConflictBot. Please resolve these conflicts locally and push the changes. Quick Fix for CHANGELOG.md ConflictsIf your conflict is only in CHANGELOG.md, you can resolve it easily using the GitHub web editor:
For all other merge conflicts, please read: Thank you for contributing! |
exploreriii
left a comment
There was a problem hiding this comment.
Hi @AshharAhmadKhan
Thank you for spending the time into making this and I like all the details you have added
Unfortunately, this is is a major refactor, you have even changed the underlying package we use for the title check
There are a few errors I see already with the packages you are using, so this will benefit from more research into what each package does and what is the latest release and what it entails
In this case, we have to require major testing
please do merge this to your fork, once corrections are made
Fork the repo
Create a branch in the fork
Open a PR
Trigger your invalid title
Watch what the job does
test various edge case scenarios, like a correct title
Then please link your test results
Thank you
MonaaEid
left a comment
There was a problem hiding this comment.
could you please provide a test link for the implementation in your fork? Thank you!
|
Hello, this is the OfficeHourBot. This is a reminder that the Hiero Python SDK Office Hours are scheduled in approximately 4 hours (14:00 UTC). This session provides an opportunity to ask questions regarding this Pull Request. Details:
Disclaimer: This is an automated reminder. Please verify the schedule here for any changes. From, |
be36fbd to
255b757
Compare
|
I've addressed all feedback from the old commits. The current code (255b757) is completely clean: ✅ All Issues Fixed:
Bot Testing Results:
All cases produced correct, helpful comments with UI/CLI instructions. Regarding fork testing: Ready for review of current code. |
|
I've been trying to test the bot on my fork as requested, but I'm running into blocking issues with the Step Security action that I need guidance on. Testing attempts on my fork:
Issues encountered: 1. Step Security subscription requirement
This appears to be because Step Security requires a paid subscription for private/forked repos, which I don't have. 2. Actions checkout SHA issues (before subscription error) Fixed this by using 3. pull_request_target caching Questions:
I've spent significant time trying to make fork testing work but keep hitting the subscription wall. Happy to continue testing if there's a viable path forward, otherwise ready to demonstrate via the main PR title change. Let me know how you'd like me to proceed. |
|
Hi! Thanks for asking, and investigating this in detail, we can certainly narrow down some of these issues and go from there
if the commit hash you are using is not considered valid, it doesn't exist, you must use the one that does exist you should follow this process for each package you use
the solution: fetch all new updates to main, git rebase main -S
|
|
Hi @AshharAhmadKhan how can we help with this to get this to the next stage? |
|
Hi @exploreriii, thanks for checking in! To move forward, I'll follow your suggestion of replacing the Step Security action with a dummy failure script for fork testing. This will let me test the bot comment logic in isolation without the subscription wall. I'll:
Will update shortly! |
255b757 to
80e9a11
Compare
|
Fork testing results using the Test — Bad title (no prefix): Branch has been rebased onto latest upstream/main with a single clean commit |
bc00232 to
f055f87
Compare
|
@exploreriii addressed all the feedback, here's what changed: CHANGELOG — did a fresh checkout from upstream/main and added only my single line under Workflow — added Bot script — replaced the accumulating Ready for another look when you get a chance, thanks! |
exploreriii
left a comment
There was a problem hiding this comment.
Please rebase, check one line, and LGTM! thank you
f055f87 to
3ed14b9
Compare
|
@exploreriii added |
3ed14b9 to
13f6ca6
Compare
|
@manishdait @exploreriii addressed the latest feedback:
|
exploreriii
left a comment
There was a problem hiding this comment.
Please check your changelog so there is only one line of change
You may need to revert or /and rebase
Thank you
exploreriii
left a comment
There was a problem hiding this comment.
Please correct the changelog so it does not have all the file changed, should just have a handful lines. Thanks
https://github.com/hiero-ledger/hiero-sdk-python/pull/1767/changes#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
Signed-off-by: Ashhar Ahmad Khan <145142826+AshharAhmadKhan@users.noreply.github.com>
13f6ca6 to
71d090e
Compare
|
Hey @exploreriii, rebased onto latest upstream/main and the changelog is clean now, just the one line for #1705 under ### .github. Only 3 files changed total. All checks are green. Ready for another look when you get a chance, thanks! |
|
Thank you so much @AshharAhmadKhan ! |

Overview
This PR adds an automated bot that comments on PRs when the conventional title check fails, providing helpful guidance to contributors.
Changes
.github/scripts/bot-conventional-pr-title.js- Bot script with intelligent title suggestions.github/workflows/pr-check-title.yml- Integrated bot to run on title check failureCHANGELOG.md- Added entry under [Unreleased] → Added sectionFeatures
✅ Detects when PR title validation fails
✅ Shows current (invalid) title
✅ Suggests appropriate conventional type based on keywords
✅ Provides both UI and CLI instructions for fixing
✅ Prevents duplicate comments by updating existing ones
✅ Links to Conventional Commits documentation
Implementation Details
Bot Logic (
bot-conventional-pr-title.js)Workflow Integration (
pr-check-title.yml)pull-requests: writepermission for bot to commentif: failure())actions/github-script@v8.0.0to run bot in workflow contextRelated issue(s)
Fixes #1705
Notes for reviewer
This is a fresh, clean implementation created in response to PR #1710 being closed due to pollution.
Changes from previous PR:
upstream/main(commit11bb2f9)Testing:
bot-*.js)What to test in this PR:
Checklist