Coder Social home page Coder Social logo

ttik's Introduction

ghtik

GitHub Ticket Status Checker and Modifier

This Bash script can check and modify the status of tickets on GitHub repositories. It provides a convenient command-line interface to interact with GitHub issues, allowing to view, update status, assign, and more. When executed from a Git repository, the script will automatically detect the project associated with the repository and fetch the tickets for that project.

When a ticket is selected, the description is printed to the terminal, and you are prompted to choose an action to perform on the ticket. Actions include moving the ticket to a different status column, closing it, or assigning it to a user.

When a ticket is moved into the "in progress" column, the script will prompt for the creation of a new branch 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.

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/ghtik.sh
  1. Make sure fzf is installed on your system.
  2. Make sure gh is installed and authenticated with your GitHub account.

Usage

Run the script with the following command:

ghtik [FLAGS]

Flags

  • -h, --help: Display help information.
  • -a, --all: Show all tickets, including done tickets.
  • -l, --list: List all tickets in the current project.
  • -o, --options: Show all options, including ticket manipulation.
  • except for the -h flag, the other single-letter flags can be combined with each other, eg.: ghtik -ao

Ticket Manipulation

  • Tickets can be searched using fuzzy search.

  • Selecting a ticket will prompt you to manipulate it.
  • Actions include moving the ticket to a different status column, closing it, or assigning it to a user.
  • Assigning to "@me" will assign the ticket to you.

  • For the non --options mode, the project only displays the options to move the ticket into "In Progress"/"in progress" or "Sprint Backlog"/"sprint backlog" columns. For the --options mode, the project displays all the options to move the ticket into any column, close the ticket, assign the ticket to a user.

  • Moving a ticket to the "In Progress" column will prompt for the creation of a new branch with the ticket number and title as the branch name.

  • If the user currently has not checked out "main" or "dev" branch, the script will prompt to switch to "dev" or "main" branch before creating the new branch.

Examples

# Show help
ghtik --help

# List all tickets in the current project
ghtik -l

# Show all tickets, including done tickets
ghtik -a

# Show all options, including ticket manipulation, you can also create an alias eg.: alias ghtik="ghtik -o"
ghtik -o

Contributing

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

License

This script is licensed under the MIT License.

ttik's People

Contributors

vvhg1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.