Skip to content

fix: isParentActive return type to boolean#7121

Merged
CommanderStorm merged 1 commit intolouislam:masterfrom
terisikk:fix/isParentActive-boolean-type
Mar 9, 2026
Merged

fix: isParentActive return type to boolean#7121
CommanderStorm merged 1 commit intolouislam:masterfrom
terisikk:fix/isParentActive-boolean-type

Conversation

@terisikk
Copy link
Copy Markdown
Contributor

@terisikk terisikk commented Mar 9, 2026

Uses similar logic as isActive to force the original integer type to boolean to match the original intent.

Summary

In this pull request, the following changes are made:

  • Monitor.isParentActive is fixed to use the same style as isActive, since the current implementation returns active: 0 for paused monitors, not active: true. The current behavior breaks the unofficial breml terraform provider.

To disclose LLM usage, claude code was used to debug the issue, the fix is my own and matches what a similar part in the codebase does.

Please follow this checklist to avoid unnecessary back and forth (click to expand)
  • ⚠️ If there are Breaking change (a fix or feature that alters existing functionality in a way that could cause issues) I have called them out
  • 🧠 I have disclosed any use of LLMs/AI in this contribution and reviewed all generated content.
    I understand that I am responsible for and able to explain every line of code I submit.
  • 🔍 Any UI changes adhere to visual style of this project.
  • 🛠️ I have self-reviewed and self-tested my code to ensure it works as expected.
  • 📝 I have commented my code, especially in hard-to-understand areas (e.g., using JSDoc for methods).
  • 🤖 I added or updated automated tests where appropriate.
  • 📄 Documentation updates are included (if applicable).
  • 🧰 Dependency updates are listed and explained.
  • ⚠️ CI passes and is green.

Uses similar logic as isActive to force the original integer type
to boolean to match the original intent.
Copilot AI review requested due to automatic review settings March 9, 2026 08:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

Hello and thanks for lending a paw to Uptime Kuma! 🐻👋
As this is your first contribution, please be sure to check out our Pull Request guidelines.
In particular: - Mark your PR as Draft while you’re still making changes - Mark it as Ready for review once it’s fully ready
If you have any design or process questions, feel free to ask them right here in this pull request - unclear documentation is a bug too.

Copy link
Copy Markdown
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

Fixes Monitor.isParentActive to return a proper boolean (matching Monitor.isActive), avoiding 0 being returned for paused ancestors and improving downstream compatibility (e.g., consumers expecting strict booleans).

Changes:

  • Update Monitor.isParentActive to use parent.active === 1 so the method always returns a boolean.

@terisikk terisikk changed the title Fix isParentActive return type to boolean fix: isParentActive return type to boolean Mar 9, 2026
Copy link
Copy Markdown
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

Fair

@CommanderStorm CommanderStorm merged commit aedac23 into louislam:master Mar 9, 2026
30 of 32 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 9, 2026

@terisikk congrats on your first contribution to Uptime Kuma! 🐻
We hope you enjoy contributing to our project and look forward to seeing more of your work in the future! If you want to see your contribution in action, please see our nightly builds here.

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.

3 participants