gh [command] [arguments]
A custom script to emulate basic functionalities of the GitHub CLI (gh). This tool provides a simplified interface for common GitHub operations. Respects GITHUB_TOKEN, provides basic workflow, no crying.
Clones the specified repository.
<repository>: URL of the repository to clone.
Creates a new repository.
<name>: Name of the new repository.--public: Creates a public repository.--private: Creates a private repository (default).
Checks out the branch associated with the given pull request number.
<pr-number>: The number of the pull request.
Lists all pull requests for the specified repository.
<repository>: Repository for which to list pull requests.
Displays details about a specific pull request.
<repository>: Repository to which the pull request belongs.<pr-number>: The number of the pull request.
Creates a new pull request for the current branch. It automates the process of adding, committing, creating a new branch, pushing it, and then creating a pull request.
- Interactive prompts guide the process.
-
Clone a repository:
gh repo clone https://github.com/username/repo.git -
Create a private repository:
gh repo create myrepo -
Create a public repository:
gh repo create myrepo --public -
Checkout a pull request:
gh pr checkout 42 -
List pull requests for a repository:
gh pr list username/repo -
View a specific pull request:
gh pr view username/repo 42 -
Create a new pull request:
gh pr create- Follow the interactive prompts to add, commit, and push changes, and create the PR.
[hollerith]
GitHub CLI official documentation: https://cli.github.com/manual/