現象
なんどやっても失敗するんですね.
$ hub pull-request -i 9 -b develop
Warning: Issue to pull request conversion is deprecated and might not work in the future.
Error creating pull request: Unprocessable Entity (HTTP 422)
Not allowed to change field "issue"
とか,develop のところを upstream である sasarky/ipuhubot とかいろいろ変えてみましたが状況は変わらず...
原因
githubアカウントを2つ持っているのですが,hub コマンドを想定と異なるユーザと連携していました...orz
今回の操作の場合,issue を発行したユーザでなければ,PullRequest に付け替えることができないので Not allowed なんですね.
hub コマンドは初回実行時にアカウントとパスワードを聞かれると思います.パスワードは保存されませんが,アカウントとOAuthトークンは ~/.config/hub に保存されています.
対処
~/.config/hub を削除するともう一度ログインを尋ねられるので,
rm ~/.config/hub
でいったん削除してから hub コマンドを実行すると正しく動作しますた
$ hub pull-request -i 9 -b sasarky:ipuhubot/develop
github.com username: isseium
github.com password for isseium (never stored):
deprecated and might not work in the future.
https://github.com/sasarky/ipuhubot/pull/9