1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Fix a couple of issues with a feeds (#14897) (#14903)

Backport (#14897)

witch fix couple of issues with feeds
This commit is contained in:
6543
2021-03-06 06:13:38 +01:00
committed by GitHub
parent da80e90ac8
commit 8e792986bb
2 changed files with 7 additions and 1 deletions

View File

@@ -689,6 +689,11 @@ func ActionIcon(opType models.ActionType) string {
// ActionContent2Commits converts action content to push commits
func ActionContent2Commits(act Actioner) *repository.PushCommits {
push := repository.NewPushCommits()
if act == nil || act.GetContent() == "" {
return push
}
if err := json.Unmarshal([]byte(act.GetContent()), push); err != nil {
log.Error("json.Unmarshal:\n%s\nERROR: %v", act.GetContent(), err)
}