* deletion for issues with confirmation flag
* add handling for interaction case
* finish implementation for issues
* finish the implementation for issues
* finalize the implementation for PR
* fix missing --yes flag for PR
* address PR comments related to feedbacks
* improve CommentablePreRun for pre checks
* improve confirmation prompt and truncate long comment body
* address PR comments on tests
* Truncate comment for confirmation prompt
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Improve test case descriptions
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Fix mock comment body
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Remove irrelevant prompt stub
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Use `opts.Interactive` as TTY indicator
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Fix expected `Interactive` value
Signed-off-by: Babak K. Shandiz <babakks@github.com>
* Polish `TestNewCmdComment`
Signed-off-by: Babak K. Shandiz <babakks@github.com>
---------
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Co-authored-by: Babak K. Shandiz <babakks@github.com>
There is still a bit of work to get the gh pr comment tests in order, however this goes a way towards fixing the issue along with acceptance tests.
Also, it turns out some of the issue acceptance tests were really running `pr` tests.
The `issue comment` command would perform a `filepath.Base()` on the
value of EDITOR and use the result for launching the editor, which is
undesireable for both functional and display purposes:
- For functional purposes, always shellsplit the value of GH_EDITOR or
EDITOR before we shell out to that process;
- For display purposes, extract the basename only after shellsplitting.