Skip to content

fix: add automatic update checks#19

Merged
LichKing-2234 merged 1 commit into
mainfrom
fix/auto-update-check
May 9, 2026
Merged

fix: add automatic update checks#19
LichKing-2234 merged 1 commit into
mainfrom
fix/auto-update-check

Conversation

@LichKing-2234
Copy link
Copy Markdown
Owner

Summary

  • Add a throttled automatic update notice for interactive human CLI commands.
  • Keep machine output clean and allow disabling checks with ATLASSIAN_DISABLE_UPDATE_CHECK=1.
  • Document the behavior and add regression coverage for notice, throttle, disable, and failure paths.

Test Plan

  • PYTHONPATH=src .venv/bin/python -m pytest -q
  • .venv/bin/ruff format --check .
  • .venv/bin/ruff check README.md pyproject.toml src tests docs

Copy link
Copy Markdown

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 an automatic (throttled) update-notice mechanism to the CLI so interactive human runs can be informed about newer GitHub Releases without polluting machine-readable output, and provides documentation + tests for the behavior.

Changes:

  • Introduces a cached/throttled check_for_update_notice() flow that records state in an on-disk JSON cache and supports disabling via ATLASSIAN_DISABLE_UPDATE_CHECK.
  • Hooks the update notice into the Typer root callback for interactive sessions (stderr TTY) while skipping machine output modes and the update command group.
  • Adds README documentation and regression tests covering notice, throttling, disabling, and failure paths.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/atlassian_cli/update.py Implements the update-check state file, throttling logic, and notice formatting/decision logic.
src/atlassian_cli/cli.py Emits the update notice for interactive, non-machine output commands (excluding update).
tests/test_update.py Adds tests for update notice behavior + CLI emission rules.
README.md Documents the automatic update check behavior and disable flag.

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

Comment thread src/atlassian_cli/cli.py Outdated
Comment thread src/atlassian_cli/update.py
Comment thread src/atlassian_cli/update.py
@LichKing-2234 LichKing-2234 force-pushed the fix/auto-update-check branch from ccee61a to baee014 Compare May 9, 2026 07:52
@LichKing-2234 LichKing-2234 merged commit 1f8757a into main May 9, 2026
1 check passed
@LichKing-2234 LichKing-2234 deleted the fix/auto-update-check branch May 9, 2026 07:54
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