fancy print

This commit is contained in:
6543 2022-09-27 13:02:08 +02:00
parent c141bb650a
commit 7a339d227f
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE

View file

@ -26,7 +26,7 @@ func PullDetails(pr *gitea.PullRequest, reviews []*gitea.PullReview, ciStatus *g
state := formatPRState(pr)
out := fmt.Sprintf(
"# #%d %s (%s)\n@%s created %s\t**%s** <- **%s**\n\nAllow maintainer to edit: %v\n\n%s\n\n",
"# #%d %s (%s)\n@%s created %s\t**%s** <- **%s**\n\n%s\n\n",
pr.Index,
pr.Title,
state,
@ -34,7 +34,6 @@ func PullDetails(pr *gitea.PullRequest, reviews []*gitea.PullReview, ciStatus *g
FormatTime(*pr.Created, false),
base,
head,
pr.AllowMaintainerEdit,
pr.Body,
)
@ -65,6 +64,10 @@ func PullDetails(pr *gitea.PullRequest, reviews []*gitea.PullReview, ciStatus *g
}
}
if pr.AllowMaintainerEdit {
out += "- Maintainers are allowed to edit"
}
outputMarkdown(out, getRepoURL(pr.HTMLURL))
}