Skip to content

Improvement suggestions based on the latest main branch #10

Description

@yang12535

I updated to the latest main branch (a429072) and re-tested github-ops from Git Bash on Windows. The proxy-related friction I saw earlier is gone, but the following issues still exist in the current code.


1. gh-issue.sh swallows error output on failure

Reproduction:

bash scripts/gh-issue.sh nonexistent-owner/nonexistent-repo-12345 list

Observed: exit code 49, no stdout/stderr.

Root cause: set -e exits immediately when gh-api.py returns non-zero, but the wrapper does not capture and forward the error message.

Suggested fix: Remove set -e or wrap the gh-api.py calls so stderr/stdout is printed before exiting. Example:

"$API" "repos/$REPO/issues" -p || {
    echo "Error: failed to list issues for $REPO" >&2
    exit 1
}

Adding a --verbose / -v flag would also help debugging.


2. python3 may not exist on Windows Git Bash

Observation: gh-issue.sh calls python3 directly. On Windows Git Bash, the available interpreter is usually python or py, not python3.

Suggested fix: Detect the interpreter at the top of each wrapper:

PYTHON="$(command -v python3 || command -v python || command -v py)"
if [ -z "$PYTHON" ]; then
    echo "Error: Python interpreter not found" >&2
    exit 1
fi

3. README gives the impression Windows is poorly supported

Observation: The feature matrix shows many entries as unsupported on Windows. However, Git Bash users can run the Linux .sh scripts directly, and scripts/windows/ already has PowerShell versions of the core commands.

Suggested fix: Add a short section at the top of the README clarifying:

  • Git Bash / WSL users: use scripts/linux/*.sh or the root scripts/*.sh.
  • PowerShell users: use scripts/windows/*.ps1.

This avoids the impression that Windows is a second-class platform.


4. Success output is the full JSON response

Observation: After creating an issue, gh-api.py prints the entire JSON object. For agent workflows, a compact summary (URL + number + title) is usually enough.

Suggested fix: Make gh-issue.sh create print a compact summary by default, e.g.:

https://github.com/owner/repo/issues/10
10
Bug report ...

Keep full JSON behind a --json flag.


5. Missing issue metadata options

Observation: gh-issue.sh create only supports title and body. Common fields like labels, assignees, and milestones are not exposed.

Suggested fix: Support additional flags:

scripts/gh-issue.sh owner/repo create "Title" --body-file body.md --label bug --assignee user1

6. --max-pages is hard-coded to 10

Observation: paginate() in gh-api.py uses max_pages=10 with no CLI override. For large repositories this may truncate results unexpectedly.

Suggested fix: Add a --max-pages argument to gh-api.py and expose it in wrapper scripts.


7. Consider a --dry-run mode

Suggestion: For automation workflows, a --dry-run option that prints the request URL/headers/body without sending it would help verify payload construction.


Priority Summary

Priority Item
P1 Surface gh-api.py errors in wrapper scripts
P1 Auto-detect python / python3 / py
P2 Clarify Windows Git Bash compatibility in README
P2 Compact default output for gh-issue.sh create
P3 Support labels/assignees in issue creation
P3 Configurable --max-pages
P3 --dry-run mode

Environment

  • OS: Windows 11
  • Shell: Git Bash
  • Local skill commit: a429072 (chore: relicense from CC BY 4.0 to MIT)
  • Test command that reproduces issue test #1:
bash scripts/gh-issue.sh nonexistent-owner/nonexistent-repo-12345 list

Thanks for the useful skill!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions