pr command scriptability improvements

This commit improves behavior and error handling for pr commands when
run unattached to a tty.

- error if pr create and no -t/-f
- error if pr create and -w
- machine readable pr list
- machine readable pr view
- various cleanup of informational messages
This commit is contained in:
vilmibm 2020-07-14 16:47:32 -05:00
parent e18776c227
commit 168bd33bc9
7 changed files with 679 additions and 38 deletions

View file

@ -9,7 +9,9 @@
"number": 32,
"title": "New feature",
"url": "https://github.com/monalisa/hello/pull/32",
"headRefName": "feature"
"headRefName": "feature",
"state": "OPEN",
"isDraft": true
}
},
{
@ -18,6 +20,8 @@
"title": "Fixed bad bug",
"url": "https://github.com/monalisa/hello/pull/29",
"headRefName": "bug-fix",
"state": "OPEN",
"isDraft": false,
"isCrossRepository": true,
"headRepositoryOwner": {
"login": "hubot"
@ -27,6 +31,8 @@
{
"node": {
"number": 28,
"state": "MERGED",
"isDraft": false,
"title": "Improve documentation",
"url": "https://github.com/monalisa/hello/pull/28",
"headRefName": "docs"
@ -40,4 +46,4 @@
}
}
}
}
}