Use Print Package (#214)

print issue & URL after issue creation & edit

use print package for pull detail

Co-authored-by: Norwin Roosen <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/214
Reviewed-by: 6543 <6543@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
Norwin
2020-10-02 14:15:18 +00:00
committed by techknowlogick
parent c1d725ed34
commit 3bfae84d32
3 changed files with 15 additions and 15 deletions

View File

@@ -5,11 +5,10 @@
package cmd
import (
"fmt"
"code.gitea.io/tea/cmd/flags"
"code.gitea.io/tea/cmd/pulls"
"code.gitea.io/tea/modules/config"
"code.gitea.io/tea/modules/print"
"code.gitea.io/tea/modules/utils"
"github.com/urfave/cli/v2"
@@ -51,12 +50,6 @@ func runPullDetail(index string) error {
return err
}
// TODO: use glamour once #181 is merged
fmt.Printf("#%d %s\n%s created %s\n\n%s\n", pr.Index,
pr.Title,
pr.Poster.UserName,
pr.Created.Format("2006-01-02 15:04:05"),
pr.Body,
)
print.PullDetails(pr)
return nil
}