-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
rubocop_challenger から使うとエラーになりました。
$ bundle list | grep rubocop_challenger
* rubocop_challenger (2.0.0.pre10)
$ bundle list | grep pr_comet
* pr_comet (0.3.1)
$ env GITHUB_ACCESS_TOKEN=xxx bundle exec rubocop_challenger go --email=example@example.com --name=tsub
$ git config --get remote.origin.url
ssh://git@github.com/ryz310/rubocop_challenger
undefined method `[]' for nil:NilClass
git config の remote.origin.url の末尾に .git がないとエラーになるようです。
.git を付けたらエラーになりませんでした。
$ git remote set-url origin ssh://git@github.com/ryz310/rubocop_challenger.git
$ env GITHUB_ACCESS_TOKEN=xxx bundle exec rubocop_challenger go --email=example@example.com --name=tsub
$ git config --get remote.origin.url
ssh://git@github.com/ryz310/rubocop_challenger.git
$ git rev-parse HEAD
f715f7a6a1702cd7f4902b7225ed980d721d17b6
$ git rev-parse --abbrev-ref HEAD
master
$ git checkout -b rubocop-challenge/20191212141128
Switched to a new branch 'rubocop-challenge/20191212141128'
...
ここの正規表現が原因と思われます。
https://github.com/ryz310/pr_comet/blob/v0.3.1/lib/pr_comet/github/client.rb#L61
ちなみに、元々の remote.origin.url は ssh://git@github.com/ryz310/rubocop_challenger となってますが、こちらは ghq を使って $ ghq get -p ryz310/rubocop_challenger とした場合に設定される URI でした。
$ ghq --version
ghq version 0.14.0 (rev:ce69395)
$ ghq get -p ryz310/pr_comet
$ ghq look ryz310/pr_comet
$ git remote get-url origin
ssh://git@github.com/ryz310/pr_comet
GitHub の Clone or download で表示される URI は git@github.com:ryz310/pr_comet.git だったので、ghq くらいでしかこの問題は起きないかもしれません。
ryz310 and masakiq
Metadata
Metadata
Assignees
Labels
No labels
