class

Bootstrap::GitHubCLI

Inherits Bootstrap::CLI < Reference < Object

GitHub-oriented CLI helpers built on Bootstrap::GitHubUtils.

Constants

DEFAULT_BASE = "master"

Class methods

aliases

Return command aliases for GitHub helpers.

Source
command_line_override

Return the canonical command name for GitHub feedback.

Source
help_entries

Describe help output entries for GitHub CLI commands.

Source
infer_repo(start : Path = Path[Dir.current]) : String | Nil

Attempt to infer an owner/repo value from the working directory.

Checks the following sources in order:

  • GITHUB_REPOSITORY (Actions-compatible)
  • BQ2_GITHUB_REPO
  • .git/config remote "origin" URL (walking up from the current directory)
Source
repo_from_url?(url : String) : String | Nil

Returns owner/repo when url is a GitHub remote URL.

Source
run(args : Array(String), command_name : String) : Int32

Dispatch GitHub CLI subcommands by command name.

Source
run_pr_comment(args : Array(String), io : IO = STDOUT, http_post : Proc(String, HTTP::Headers, String, HTTP::Client::Response) | Nil = nil) : Int32

Post a PR thread comment (issue comment).

Source
run_pr_create(args : Array(String), io : IO = STDOUT, http_post : Proc(String, HTTP::Headers, String, HTTP::Client::Response) | Nil = nil) : Int32

Create a pull request on GitHub.

Source
run_pr_feedback(args : Array(String), io : IO = STDOUT, http_get : Proc(String, HTTP::Headers, HTTP::Client::Response) | Nil = nil) : Int32

Fetch PR feedback and print as JSON.

Source
summary

Summarize the GitHub CLI helpers for help output.

Source