mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
fix: drop only control character references from Markdown, keep escaped quotes in env files, reject prefill-less inline comment edits, relabel the token's account
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
7 files changed
+65
-14
No files matched your search
@@ -187,6 +187,10 @@ func (a *application) comment(cmd *cobra.Command, arg string, kind refKind, chan
|
||||
|
||||
// editComment replaces the text of comment, prefilling the prompt or editor with it.
|
||||
func (a *application) editComment(cmd *cobra.Command, t target, comment services.Comment, f commentFlags) (runErr error) {
|
||||
// An inline review comment is not fetched, so there is no text to start from.
|
||||
if comment.Author == "" && !cmd.Flags().Changed("body") && !cmd.Flags().Changed("body-file") {
|
||||
return clierr.Wrap(clierr.Usage, errors.New("an inline review comment cannot be prefilled; supply --body or --body-file"))
|
||||
}
|
||||
body, draft, err := a.readComment(cmd, f, comment.Body)
|
||||
defer finishDraft(&draft, &runErr)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user