Commit graph

19 commits

Author SHA1 Message Date
Sinan Sonmez (Chaush)
0a1e7a1fdc
Add --delete-last option to pr comment and issue comment (#10596)
* 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>
2025-05-01 14:12:55 +01:00
William Martin
e474acc2dd Issue comment early arg parsing 2025-04-17 15:27:40 +02:00
latzskim
e516e5ed5d [gh issue/pr comment] Create a comment if no comment already 2025-02-12 21:04:22 +01:00
vilmibm
42c017b887 use Prompter in Commentable 2022-10-19 13:05:00 -07:00
Seito Tanaka
e523d50176
Add support for editing last issue/pr comment (#6384) 2022-10-18 08:10:12 +00:00
Mislav Marohnić
57f49d9f8a issue/pr comment: improve docs as it relates to editor 2022-02-18 18:38:44 +01:00
Mislav Marohnić
1eb790cacd Improve issue comment re: overfetching, handling PRs
- `issue comment` no longer fetches all issue fields and thus avoids the
  problem when loading failed due to token not having access to projects

- `issue comment` now accepts either issue or pull number as argument.
2021-11-23 16:40:14 +01:00
Reto Hablützel
f6e9734f17 add more hints to docs 2021-09-25 08:38:26 +02:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
111e8dbcf2 Pass web browser to each individual command
This removes sensitivity to the BROWSER environment variable in tests
and makes it easier to verify the URL that the browser was invoked with
without having to stub sub-processes.
2021-03-19 21:22:37 +01:00
Mislav Marohnić
d5fb817dfc Remove unnecessary BodyFile field 2021-03-15 15:12:41 +01:00
Cristian Dominguez
8bfe64d593 Accept --body-file flag if --body is supported 2021-03-15 15:12:41 +01:00
Sam Coe
a26fba7800
Comment on pull requests 2021-01-21 09:47:38 -08:00
Sam Coe
723e9e31ba
Address PR comments 2021-01-11 13:56:17 -08:00
Sam Coe
155507d31d
Make comment command easier to test 2021-01-05 15:14:25 -08:00
Sam Coe
1fc8b66b26
Address PR comments 2021-01-05 10:36:03 -08:00
Sam Coe
f862123071
Modify issue commenting to adhere to designs and add tests 2021-01-05 10:35:09 -08:00
Yuki Osaki
338bf1d112
fix linter issue 2021-01-05 10:35:09 -08:00
Yuki Osaki
8ef2bb4d14
Comment on issues from editor 2021-01-05 10:35:09 -08:00