Fix/dynamic call reminder time#2213
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 53 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
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:
WalkthroughThis PR implements dynamic time-remaining calculations for community call and office hour reminder bots. A new Python utility computes the actual time remaining until a meeting, formatted as human-readable hours and minutes. Two bash scripts now read a configurable ChangesDynamic Meeting Reminders
Sequence DiagramsequenceDiagram
participant GA as GitHub Actions<br/>(Scheduler)
participant Bash as Bash Script<br/>(cron-calls-*.sh)
participant Util as Python Utility<br/>(compute-time-until-meeting.py)
participant API as GitHub API<br/>(Post Comment)
GA->>Bash: Trigger on schedule
Bash->>Bash: Read MEETING_HOUR from env<br/>Validate integer [0,23]
Bash->>Util: Call with TODAY & MEETING_HOUR
Util->>Util: Build UTC meeting datetime<br/>Compare to current UTC time
alt Meeting has already started
Util-->>Bash: Return "has already started"
Bash->>Bash: Exit without posting
else Meeting is in future
Util->>Util: Compute remaining hours/minutes<br/>Format as human-readable string
Util-->>Bash: Return e.g. "3 hours and 7 minutes"
Bash->>Bash: Set TIME_PHRASE variable<br/>Build comment body with<br/>dynamic timing & meeting hour
Bash->>API: POST comment with dynamic message
API-->>Bash: Success
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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 |
e502a75 to
e4d0816
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 539a497d-3c4d-4d35-9328-5ff027e8b86f
📒 Files selected for processing (4)
.github/scripts/cron-calls-community.sh.github/scripts/cron-calls-office-hours.sh.github/scripts/test-cron-calls-time-computation.shsrc/hiero_sdk_python/query/account_balance_query.py
There was a problem hiding this comment.
Pull request overview
Updates the GitHub cron “call reminder” bots to generate a dynamic “time until meeting” message at runtime (to account for delayed cron execution), and adds a small script to exercise the time computation logic.
Changes:
- Add a configurable
MEETING_HOURand compute a human-readableTIME_UNTIL_MEETINGin both reminder bot scripts. - Update the posted reminder messages to include the computed time remaining and the configured meeting time.
- Add a bash-based test script for the time computation logic.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/hiero_sdk_python/query/account_balance_query.py |
Adds a return type hint to _is_payment_required() (appears unrelated to the PR’s stated goal). |
.github/scripts/cron-calls-office-hours.sh |
Computes and injects dynamic “time until meeting” based on the workflow run time; makes meeting hour configurable. |
.github/scripts/cron-calls-community.sh |
Same dynamic time computation and configurable meeting hour as office-hours script. |
.github/scripts/test-cron-calls-time-computation.sh |
Adds a manual test harness for validating the time-until-meeting output formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f925559 to
bdaa864
Compare
exploreriii
left a comment
There was a problem hiding this comment.
Looking good please note organisation :)
Signed-off-by: ManmathX <manmath2006n@gmail.com>
bdaa864 to
7dd540e
Compare
|
@exploreriii Ma’am, could you please guide me on where these files should be placed? I’ve also created a |
There was a problem hiding this comment.
Hi @ManmathX, thanks for putting this together! The dynamic time computation is a really nice addition for the community and office hour calls.
I just went through the code and posted few inline comments. I found a couple of edge cases we should address before merging, specifically around how the Python script handles UTC day boundaries (if the cron runs late in the day for a meeting the next calendar day) and a small UX formatting tweak for when meetings have already started.
Let me know if you have any questions about the suggestions
|
Hi @ManmathX please apply the formatting as per our docs, then update branch to merge. |
Signed-off-by: ManmathX <manmath2006n@gmail.com>
|
Hey @exploreriii, done! I ran ruff format and ruff check locally — everything's clean now. Also fixed all the Codacy stuff (isort, future annotations, subprocess check param) All commits are signed with both -S and -s as per the workflow docs. Should be good to go — let me know if anything else needs adjusting! |
|
cc @hiero-ledger/hiero-sdk-python-committers |
|
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, |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 53 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
@ManmathX This is great work!. Please be sure to update your branch. Thank you! |
|
most approved PR 🤣 5 approvals is wild HAHAHA great work @ManmathX thank you for your contribution :D |
Signed-off-by: ManmathX <manmath2006n@gmail.com>
Signed-off-by: ManmathX <manmath2006n@gmail.com>
Description:
Updates the GitHub cron "call reminder" bots to generate a dynamic "time until meeting" message at runtime (to account for delayed cron execution), replacing the hardcoded "approximately 4 hours" message.
Changes include:
MEETING_HOURas a configurable, validated top-level variable in bothcron-calls-community.shandcron-calls-office-hours.sh..github/scripts/compute-time-until-meeting.py) to prevent duplication and ensure consistency. The logic correctly calculates hours and minutes remaining usingmath.ceilfor accurate rounding..github/scripts/test-cron-calls-time-computation.sh) containing 10 test cases to verify the time computation logic (including edge cases, rounding, and pluralization).Related issue(s): #2209
Fixes #2209
Notes for reviewer:
MOCK_TIMEargument specifically designed for testing, enabling precise validation down to the second.test-cron-calls-time-computation.share passing successfully.Checklist