mirror of
https://gitea.com/Sirherobrine23/tea.git
synced 2024-08-21 00:27:24 +00:00
8bb5c15745
add interactive `tea pr review` it's amazingly simple vendor gitea.com/noerw/unidiff-comments add `tea pr lgtm|reject` shorthands vendor slimmed down diff parser review diff: default to true if users want a shortcut, they can use lgtm or reject subcmds `tea pr approve`: accept optional comment Co-authored-by: Norwin Roosen <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/315 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: 6543 <6543@obermui.de> Co-Authored-By: Norwin <noerw@noreply.gitea.io> Co-Committed-By: Norwin <noerw@noreply.gitea.io>
30 lines
500 B
Go
30 lines
500 B
Go
package types
|
|
|
|
import "regexp"
|
|
|
|
type Line struct {
|
|
Destination int64
|
|
Source int64
|
|
Line string
|
|
Truncated bool
|
|
ConflictMarker string
|
|
CommentIds []int64
|
|
Comments CommentsTree
|
|
}
|
|
|
|
var danglingSpacesRe = regexp.MustCompile("(?m) +$")
|
|
|
|
//var lineTpl = tplutil.SparseTemplate("line", `
|
|
//{{.Line}}
|
|
|
|
//{{if .Comments}}
|
|
// {{"\n"}}
|
|
// {{.Comments}}
|
|
//{{end}}
|
|
//`)
|
|
|
|
//func (l Line) String() string {
|
|
// result, _ := lineTpl.Execute(l)
|
|
// return result
|
|
//}
|