Skip to content
/ isu Public

A command-line utility for creating GitHub issues directly from the terminal

License

Notifications You must be signed in to change notification settings

vvhg1/isu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

isu

GitHub Issue Creator

isu is a Bash script designed to simplify the process of creating new issues on GitHub directly from the command line. It automates the task of creating issues, allowing developers to focus on their work without the need to navigate through GitHub's web interface.

The script interacts with the GitHub API using the gh command-line tool, making it easy to create issues within the context of a Git repository.

Features

  • Create a new GitHub issue with a title, body, labels, and column placement.
  • Automatically adds the new issue to the project connected to the repository.
  • Can create a new branch for the issue (if the issue is not placed in a backlog or done column) with the ticket number and title as the branch name. It also checks if the user has currently checked out "main" or "dev" branch and will prompt to switch to "dev" (takes precedence over "main" if both exist) or "main" branch before creating the new branch.
  • Support for specifying story points for agile project management.

Prerequisites

Installation

  1. Clone or download the script to your local machine.
  2. Source the script in your .bashrc or .bash_profile file:
source /path/to/isu.sh
  1. Add completion to the script by adding the following line to your .bashrc or .bash_profile file:
complete -C isu isu
  1. Make sure gh is installed and authenticated with your GitHub account.

Usage

Run the script with the following command:

isu [title] [FLAGS]

Flags

  • Assumes everything up to the first flag is the title, so specifying the title flag is optional, no need to use quotes:
isu Title of the issue [FLAGS]
  • -b or --body: Specify the body of the issue.
  • -l or --labels: Specify the labels for the issue. Make sure the labels actually exist in the repository.
  • -c or --column: Specify the column to place the issue in. If not specified, the issue will be placed into the default column, normally "To Do"/"to do". Make sure the column actually exists if you specify it.
  • -n or --no-branch: Do not create a new branch for the issue. By default, the script will prompt to create a new branch if the issue is not placed in a backlog or done column.
  • -p or --no-storypoints: Do not prompt for story points. By default, the script will prompt for story points.
  • -h or --help: Show help message.

Examples

# Show help
isu -h

# Create a new issue with a title and body
isu Title of the issue -b Body of the issue

# Create a new issue with a title, body, labels, and column placement
isu Title of the issue -b Body of the issue -l bug enhancement -c In Progress

# Multi line body
isu Title of the issue -b "Body of the issue
Line 2
Line 3"

Limitations

  • isu assumes labels to not have spaces in their names (as it uses spaces to separate the labels).
  • newlines in the title are not supported.
  • if the body is multi-line, it must be enclosed in quotes.
  • labels and columns are case-sensitive - if specified, they must match the exact name in the repository, otherwise, the script will fail.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This script is licensed under the MIT License.


About

A command-line utility for creating GitHub issues directly from the terminal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages