fix: trim space on title

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
jolheiser 2023-03-19 20:40:24 -05:00
parent 374ea1ab46
commit 856ca2f2e1
No known key found for this signature in database
GPG Key ID: B853ADA5DA7BBF7A
2 changed files with 4 additions and 2 deletions

View File

@ -6,6 +6,7 @@ package service
import (
"fmt"
"strings"
"time"
"code.gitea.io/sdk/gitea"
@ -92,7 +93,7 @@ func getGiteaTagURL(c *gitea.Client, baseURL, owner, repo, mileName, gitTag, fro
func convertToEntry(issue gitea.Issue) Entry {
entry := Entry{
Index: issue.Index,
Title: issue.Title,
Title: strings.TrimSpace(issue.Title),
}
labels := make([]Label, len(issue.Labels))

View File

@ -9,6 +9,7 @@ import (
"fmt"
"net/http"
"os"
"strings"
"time"
"github.com/google/go-github/v50/github"
@ -58,7 +59,7 @@ func (gh *GitHub) Generate() (string, []Entry, error) {
for _, pr := range result.Issues {
if pr.IsPullRequest() == isPull {
p := Entry{
Title: pr.GetTitle(),
Title: strings.TrimSpace(pr.GetTitle()),
Index: int64(pr.GetNumber()),
}