ブラウザウィンドウでGithubプルリクエストを開くためのbashスクリプトを作成しようとしています。ここでBASHスクリプト内でgit repo名とgithub usernameを取得しますか?
私は実行する必要があるコマンドです:
オープンhttps://github.com/ParentOwner/RepoName /比較/ はを開発... JoshuaSoileauは:CurrentBranch
もの大胆にダイナミックにする必要があります。
私はbashで以下のものを引っ張っする方法を見つけ出す必要があります。
RepoName - name of the repo
develop - ARGUMENT to my bash script
JoshuaSoileau - github username of the current user
CurrentBranch - name of the currently checked out git branch.
私は次の操作を実行する方法を知っている:
私は1. RepoName
を引くにはどうすればよい
RepoName - ??
develop - $1 argument in my bash script
JoshuaSoileau - ??
CurrentBranch - $(git rev-parse --abbrev-ref HEAD)
BASHスクリプトの2. Current github username
?
git-open-merge() {
open https://github.com/ParentOwner/??/compare/$1...??:$(git rev-parse --abbrev-ref HEAD)
}
そして、それはこのように呼ばれています:
は、これは私がこれまで持っているものである
git-open-merge develop