Skip to content

Add \bug command#1626

Merged
rolandwalker merged 1 commit intomainfrom
RW/add-bug-command
Feb 26, 2026
Merged

Add \bug command#1626
rolandwalker merged 1 commit intomainfrom
RW/add-bug-command

Conversation

@rolandwalker
Copy link
Contributor

Description

Add \bug command, which opens a browser to the GitHub Issues page.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Feb 25, 2026
@github-actions
Copy link

Review summary
Small, clear change. I see one correctness edge case and one missing test.

Findings (ordered by severity)

  1. Misleading success message if browser fails to open. webbrowser.open_new_tab() returns True/False and can raise in some environments, but file_bug always reports success. Consider checking the return value and catching exceptions to show a failure status.
    File: mycli/packages/special/main.py

  2. Missing test for the new side effect. There’s no test to assert the command calls the browser opener and handles failure. A unit test that mocks webbrowser.open_new_tab would prevent accidental regressions and avoid opening a browser during tests.
    File: mycli/packages/special/main.py

Open questions / assumptions

  • Should \bug be a no-op (with a message) in non-interactive contexts or CI? If yes, guard with a TTY check before opening a browser.

If you want, I can draft the test and error handling changes.

which opens a browser to the GitHub Issues page
@rolandwalker
Copy link
Contributor Author

Merging this minor PR without review to help with rebasing. Comments welcome.

@rolandwalker rolandwalker merged commit f53191d into main Feb 26, 2026
8 checks passed
@rolandwalker rolandwalker deleted the RW/add-bug-command branch February 26, 2026 11:27
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