You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature or problem you’d like to solve
Currently running gh pr comment --edit-last will fail if there is not an existing comment from the author. It would be nice to prompt users and/or allow users to use the option (or a new option) that will edit the last comment if it it exists but creates a new one if not.
❯ gh pr comment 5 --edit-last --body 'This is just a test'
no comments found for current user
Proposed solution
Add an additional option for gh pr comment such as --edit-last-or-create that will not fail if the user hasn't yet commented on the PR, it will simply create a new comment.
❯ gh pr comment 5 --edit-last-or-create --body 'This is just a test'
https://github.com/joe-sharp/<redacted>/pull/5#issuecomment-<redacted>
How will it benefit CLI and its users?
Script writers will no longer need to worry about making a conditional to check if a comment exists before running the command. This is useful for commenting the results of a build or linting job without polluting the PR with multiple comments.
Additional context
Please let me know if additional context is needed, but this should be pretty straight forward.
Describe the feature or problem you’d like to solve
Currently running
gh pr comment --edit-lastwill fail if there is not an existing comment from the author. It would be nice to prompt users and/or allow users to use the option (or a new option) that will edit the last comment if it it exists but creates a new one if not.Proposed solution
Add an additional option for
gh pr commentsuch as--edit-last-or-createthat will not fail if the user hasn't yet commented on the PR, it will simply create a new comment.How will it benefit CLI and its users?
Script writers will no longer need to worry about making a conditional to check if a comment exists before running the command. This is useful for commenting the results of a build or linting job without polluting the PR with multiple comments.
Additional context
Please let me know if additional context is needed, but this should be pretty straight forward.