mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
push tag support
This commit is contained in:
@@ -6,9 +6,10 @@ package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
// "github.com/gogits/git"
|
||||
"github.com/gogits/git"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
@@ -74,10 +75,12 @@ func CommitRepoAction(userId int64, userName, actEmail string,
|
||||
|
||||
opType := OP_COMMIT_REPO
|
||||
// Check it's tag push or branch.
|
||||
// if git.IsTagExist(RepoPath(userName, repoName), refName) {
|
||||
// opType = OP_PUSH_TAG
|
||||
// commit = &base.PushCommits{}
|
||||
// }
|
||||
if strings.HasPrefix(refName, "refs/tags/") {
|
||||
opType = OP_PUSH_TAG
|
||||
commit = &base.PushCommits{}
|
||||
}
|
||||
|
||||
refName = git.RefEndName(refName)
|
||||
|
||||
bs, err := json.Marshal(commit)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user