Skip to content

🌱 feat: add heartbeat mechanism with dev bot check#2177

Merged
mkmccarty merged 1 commit intomainfrom
mm-branch-1
Feb 7, 2026
Merged

🌱 feat: add heartbeat mechanism with dev bot check#2177
mkmccarty merged 1 commit intomainfrom
mm-branch-1

Conversation

@mkmccarty
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 7, 2026 06:38
@mkmccarty mkmccarty merged commit e389b43 into main Feb 7, 2026
14 checks passed
@mkmccarty mkmccarty deleted the mm-branch-1 branch February 7, 2026 06:38
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

Adds a dev-bot guard to the existing heartbeat mechanism so development deployments don’t emit the heartbeat file updates.

Changes:

  • Add a config.IsDevBot() early-return in startHeartbeat to disable heartbeats for the dev bot.
  • Add a function comment describing the heartbeat behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return i.Member.User.ID
}

// Heartbeat function to update the modification time of a file at regular intervals
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The function-level comment is now slightly inaccurate because startHeartbeat can be a no-op when config.IsDevBot() is true. Consider updating the comment to mention that the heartbeat is skipped for the dev bot so the behavior matches the documentation.

Suggested change
// Heartbeat function to update the modification time of a file at regular intervals
// Heartbeat function to update the modification time of a file at regular intervals;
// when running as the dev bot (config.IsDevBot() == true) this is a no-op.

Copilot uses AI. Check for mistakes.
func startHeartbeat(filepath string, interval time.Duration) {
if config.IsDevBot() {
return

Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

There’s an extra blank line inside the if config.IsDevBot() block after return. Please remove it to keep the control flow block tidy (and avoid unnecessary diffs if gofmt/lint rules are enforced).

Suggested change

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant