← 全部工具

majiayu000/gh-mine

热度 65 更新于 开发与构建

List your own open GitHub issues and pull requests in one command.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

gh-mine

List your own open GitHub issues and pull requests in one command.

gh-mine is a small shell utility built on the GitHub CLI (gh) that lists the open issues and pull requests that belong to you — by default, only the repositories you own (excluding upstream repos you merely filed an issue against).

Why

gh issue list and the GitHub notifications view mix everything together: issues you filed on upstream projects, PRs scattered across orgs, issues assigned to you on someone else's repo. gh-mine gives you three clean scopes so you only see what is actually yours.

Requirements

  • gh — authenticated (gh auth login)
  • jq
  • bash

Install

One-liner (drops gh-mine into ~/.local/bin; override with GHMINEINSTALLDIR):

curl -fsSL https://raw.githubusercontent.com/majiayu000/gh-mine/main/install.sh | bash

The installer stages the download in the target directory, validates Bash syntax, and atomically replaces an existing install only after validation. Set GHMINEVERSION to install another tag, branch, or commit. The value must be a single Git ref: letters, digits, ., , -, and / only — no .., no .-only path segments, no leading or trailing /, and no empty path segments (this blocks raw.githubusercontent.com path traversal / silent ./ normalization into other refs). For an exact integrity check, also set GHMINESHA256 to the expected 64-digit SHA256:

curl -fsSL https://raw.githubusercontent.com/majiayu000/gh-mine/main/install.sh |
  env GH_MINE_VERSION=v1.2.3 GH_MINE_SHA256=YOUR_64_HEX_SHA256 bash

Manual:

curl -fsSL https://raw.githubusercontent.com/majiayu000/gh-mine/main/gh-mine \
  -o ~/.local/bin/gh-mine
chmod +x ~/.local/bin/gh-mine

Make sure ~/.local/bin is on your PATH.

Usage

gh-mine                  # your own repos: open issues + PRs (default)
gh-mine -i | --issues    # issues only
gh-mine -p | --prs       # PRs only
gh-mine --discussions    # latest Discussions in repos you own
gh-mine --moved-to-discussion # closed issues whose body/comments link to discussions/
gh-mine --hygiene        # Discussions + moved-to-discussion view
gh-mine --discussion-limit 50 # max Discussions read per repo (default: 20)
gh-mine --authored       # scope: everything you created (all repos)
gh-mine --assigned       # scope: everything assigned to you (all repos)
gh-mine --repo <name>    # limit to one repo (owner optional)
gh-mine --stale <days>   # only items not updated in <days> days
gh-mine --label <name>   # filter by label (repeatable, AND)

gh-mine --plain # legacy grouped text output gh-mine --json # emit a JSON array (for jq / piping) gh-mine -h | --help