Giter VIP home page Giter VIP logo

pr-cli's Introduction

PR-CLI

Pull Request - Command Line Interface

✨ Functionality

Picking commits (pr-cli pick)

Quickly cherry-pick one or more commits from your current branch onto a new one and create a pull request for these commits.

Very useful when doing a quick bugfix/cleanup/change unrelated to your branch. Or when creating frequent, small commits.

  • No need to leave your current branch!
  • Uncommitted changes are not a problem, no need to stash

pr-cli achieves this by creating a new worktree in a temporary directory, so that your main worktree is completely unaffected

  • Interactive settings / confirmation screen

It also has all the PR title/body features of pr-cli pr

Usage

  1. Run pr-cli pick (or pr-cli p) in a git repository
  2. Choose the commits you want to pick (If there is more than one)
  3. Choose how to set the pull request title (will also be used as branch name)
  4. Confirm/Change settings
  5. Press Enter to create Pull Request

Creating a pull request (pr-cli pr)

Create a GitHub pull request based on your current branch, like gh pr create but better.

  • Quick options for setting the PR title
    • Use one of the commit's titles
    • Use the branch name
    • Type a custom one
  • Automatically generate PR body based on all commits

Demo

pr-cli pick demo

📥 Installation

⬆️ Upgrading

To upgrade your installation to the latest version:

deno install --reload --force --name pr-cli --allow-run --allow-read --allow-env https://deno.land/x/prcli/main.ts

🔲 Completions

Enable auto-completion of pr-cli commands by running the command for your shell:

Bash

echo 'source <(pr-cli completions bash)' >> ~/.bashrc

ZSH

echo 'source <(pr-cli completions zsh)' >> ~/.zshrc

Fish

echo 'source (pr-cli completions fish | psub)' >> ~/.config/fish/config.fish:

pr-cli's People

Contributors

annervisser avatar dependabot[bot] avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pr-cli's Issues

Error when editing a PR and trying to mark is as draft

▶️ Updating pull request
unknown flag: --draft

Usage:  gh pr edit [<number> | <url> | <branch>] [flags]

Flags:
      --add-assignee login      Add assigned users by their login. Use "@me" to assign yourself.
      --add-label name          Add labels by name
      --add-project name        Add the pull request to projects by name
      --add-reviewer login      Add reviewers by their login.
  -B, --base branch             Change the base branch for this pull request
  -b, --body string             Set the new body.
  -F, --body-file file          Read body text from file (use "-" to read from standard input)
  -m, --milestone name          Edit the milestone the pull request belongs to by name
      --remove-assignee login   Remove assigned users by their login. Use "@me" to unassign yourself.
      --remove-label name       Remove labels by name
      --remove-project name     Remove the pull request from projects by name
      --remove-reviewer login   Remove reviewers by their login.
  -t, --title string            Set the new title.
  
▶️ Cleaning up temporary worktree
 ❗ Command execution failed with code 1 

auto-detect pull/push remotes

Detect the presence of remotes called origin / upstream
push: use origin by default, ask if no origin
pull: upstream, otherwise use same as push

Automate releases

Automatically create pre-releases, with a manual prod release step

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update dependency @types/node to v20.12.2

Detected dependencies

docker-compose
e2e-test/docker-compose.yml
  • mcr.microsoft.com/playwright v1.42.1-jammy@sha256:b2b78a74b04b3cfdf35046c623c49741de35ef67f1b4a21de8e316dbb89fe68e
dockerfile
e2e-test/docker/Dockerfile
  • docker.io/debian bookworm-slim@sha256:ccb33c3ac5b02588fc1d9e4fc09b952e433d0c54d8618d0ee1afadf1f3cf2455
  • docker.io/denoland/deno bin-1.36.4@sha256:fa16fb8d2620aea62396929b7cdb2bd7abb2d1d38335567f95789d077f2c4523
  • docker.io/charmcli/gum v0.13@sha256:54dd18742e0bc16b603c0dd87088d0fb3fd49d82a5c97c258f3753f7b257939a
  • docker.io/tsl0922/ttyd 1.7.7@sha256:9a058c087bca6df456cb728514eafe778ea384369a622b3604c8b5256b67237d
github-actions
.github/workflows/e2e.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
  • actions/upload-artifact v4@5d5d22a31266ced268874388b861e4b58bb5c2f3
.github/workflows/lint.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • denoland/setup-deno v1
npm
e2e-test/package.json
  • @playwright/test 1.42.1
  • @types/node 20.11.30
  • @typescript-eslint/eslint-plugin 7.4.0
  • @typescript-eslint/parser 7.4.0
  • eslint 8.57.0
  • eslint-config-prettier 9.1.0
  • eslint-plugin-playwright 1.5.4
  • npm-run-all2 6.1.2
  • prettier 3.2.5
regex
.github/workflows/e2e.yml
  • node 20
.github/workflows/lint.yml
  • denoland/deno v1.42.0

  • Check this box to trigger a request for Renovate to run again on this repository

Improve PR command ux

  • A git pull should (optionally) be done before pushing
  • Support for editing pr title/body should be added
  • More feedback should be given as to what the command is doing
  • It should support updating a PR (if pr exists -> run update instead of create)

Set PR title and description instead of using GitHub's autogeneration

GitHub's default behaviour for especially the description is dumb, and looks at the last commit or adds no description at all.

Wanted behaviour:
title: commit title if 1 commit, otherwise branch name converted to text (no dashes)
description: concatenation of all commit messages

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.