✨ A handy CLI tool to manage GitHub issues & pull requests with ease ✨
# Install globally
npm install gitip -g
gitip
# Or run directly with npx
npx gitip1. Selection mode
gitip
2. Quick command mode
gitip i # or gitip issue
gitip p # or gitip pr
gitip s # or gitip sync
gitip c # or gitip cleanBy default, this tool operates in the fork repo system mode. ✨
If you prefer to use the origin repo system mode, simply include the ORIGIN_REPO_OWNER variable in your .env file. When ORIGIN_REPO_OWNER is detected, the tool will automatically switch to origin repo system mode, allowing you to interact directly with the original repository. 🚀
fork repo system= manage issues and pull requests in a forked repositoryorigin repo system= manage issues and pull requests directly in the original repository
This tool determines which .env file to load based on the following priority order:
.env.local.env.test.env.development.env.production- Any other
.env.*file (e.g.,.env.staging,.env.custom) .env
If multiple .env files are present, the file with the highest priority will be loaded.
💡 If you want to initialize the environment variables required, It is recommended to use the
initcommand.
Please refer to the Commands section for more information.
Use the following setup for working with a forked repository:
GIT_ACCESS_TOKEN=your-github-access-token
FORK_REPO_OWNER=fork-repo-owner-name
UPSTREAM_REPO_OWNER=upstream-repo-owner-name
REPO_NAME=repository-name
DEFAULT_BRANCH_NAME=default-branch-name
TEMPLATE_TITLE_PLACEHOLDER=(optional) issue template title placeholderUse the following setup for working directly with the original repository:
GIT_ACCESS_TOKEN=your-github-access-token
ORIGIN_REPO_OWNER=origin-repo-owner-name
REPO_NAME=repository-name
DEFAULT_BRANCH_NAME=default-branch-name
TEMPLATE_TITLE_PLACEHOLDER=(optional) issue template title placeholder- ✅ If the
ORIGIN_REPO_OWNERvariable is present in the.envfile, gitip automatically switches to origin repo system mode. - 🚫 If
ORIGIN_REPO_OWNERis missing, the tool defaults to fork repo system mode. - 🔍 The tool checks for
.envfiles in the current directory and loads them based on the priority described above. ⚠️ Ensure all required variables are included in the selected.envfile to avoid runtime errors.
This tool uses GitHub issue templates. If a template isn't available, the default template will be used. To use a specific template, set the TEMPLATE_TITLE_PLACEHOLDER variable in your .env file.
- Easily create GitHub issues with just a few steps.
[Prerequisite]
- Commit your changes.
- Select "Create a pull request."
- The pull request title is automatically suggested based on your latest commit message. However, only commits with conventional prefixes (like
feat:,test:,fix:, etc.) will be extracted. For commits without these prefixes, you'll need to enter the title manually. - Related issues are automatically closed when the pull request is merged (if the base branch is the default branch).
Note
To use the "close" keyword for related issues, the base branch must be the default branch.
Keep your fork updated with the origin branch effortlessly.
😭 Manual Method (Not Recommended):
Remove unused branches locally and remotely with ease.
-o, --origin: Use origin repository (default is fork).-v, --version: Display the current version.-h, --help: Show help message.
- Initialize default
.envfile with required environment variables. - This command will create or update the
envfile in your current directory. - Usage:
gitip init
- Manage GitHub issues: Create, update, or retrieve issues.
- Usage:
gitip i
- Manage GitHub pull requests: Create, update, or list pull requests.
- Usage:
gitip p
- Synchronize your fork with the origin repository.
- Usage:
gitip s
- Remove unused branches locally or remotely.
- Usage:
gitip c
- Use the
TEMPLATE_TITLE_PLACEHOLDERenvironment variable to customize your issue titles. - Keep your
.envfiles updated for both fork and origin systems.
Enjoy managing your GitHub repositories with gitip! 😊