Skip to content

Conversation

@linw1995
Copy link
Owner

Summary

This PR addresses #143 by adding gh (GitHub CLI) and sleep commands to the safe commands list.

Changes

1. Sleep Command

  • Added sleep command support
  • Allows positional arguments for specifying duration
  • Safe flags: --help, --version

2. GitHub CLI (gh) - Read-Only Operations

Added safe read-only gh commands:

  • gh --help and gh --version
  • gh issue list and gh issue view
  • gh pr list and gh pr view
  • gh repo view
  • gh release list and gh release view

Use Cases

These additions enable:

  • Automation workflows: Query issues and PRs, monitor CI runs
  • Rate limiting: Add delays between API calls
  • Monitoring: Watch repository status and releases
  • Debugging: Test timing-dependent behavior

Security

All gh commands added are read-only operations (list/view only). Write operations like gh issue create, gh pr create, etc. remain restricted unless explicitly authorized.

Fixes #143

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.85%. Comparing base (a46f02c) to head (ea65418).
⚠️ Report is 6 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #144      +/-   ##
==========================================
- Coverage   50.22%   48.85%   -1.38%     
==========================================
  Files          93       95       +2     
  Lines       25033    26112    +1079     
==========================================
+ Hits        12574    12756     +182     
- Misses      12459    13356     +897     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@linw1995 linw1995 merged commit 964d1c5 into dev Jan 24, 2026
3 checks passed
@linw1995 linw1995 added the enhancement New feature or request label Jan 24, 2026
@linw1995 linw1995 deleted the feature/safe-commands-gh-sleep branch January 24, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add gh and sleep commands to safe commands list

3 participants