1
1
mirror of https://gitea.com/gitea/tea synced 2024-11-23 08:22:40 +01:00
tea/modules/print/pull.go

25 lines
488 B
Go
Raw Normal View History

// Copyright 2020 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package print
import (
"fmt"
"code.gitea.io/sdk/gitea"
)
// PullDetails print an pull rendered to stdout
func PullDetails(pr *gitea.PullRequest) {
OutputMarkdown(fmt.Sprintf(
"# #%d %s (%s)\n%s created %s\n\n%s\n",
pr.Index,
pr.Title,
pr.State,
pr.Poster.UserName,
FormatTime(*pr.Created),
pr.Body,
))
}