Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

Currently, the rig maintenance check sends a Slack notification regardless of whether maintenance is needed, including a "🎉 All rig maintenance is up to date!" message when everything is current. This creates notification noise when no action is required.

Changes

  • Added conditional check in check_rig_maintenance.py to skip Slack notification when overdue_items is empty
  • Only alerts are sent when rigs have overdue or upcoming maintenance that requires attention
# Before
send_slack_notification(overdue_items, current_date)

# After  
if overdue_items:
    current_date = datetime.now().date()
    send_slack_notification(overdue_items, current_date)

Exit codes remain unchanged (0 when up to date, 1 when issues exist).

Original prompt

Update the rig maintenance alert to only send out if the amount of rigs needing or will need maintenance is 0. If total is 0 don't send 0


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: tabedzki <35670232+tabedzki@users.noreply.github.com>
Copilot AI changed the title [WIP] Update rig maintenance alert logic Skip rig maintenance alert when all rigs are up to date Dec 18, 2025
Copilot AI requested a review from tabedzki December 18, 2025 13:05
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.

2 participants