mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Fix action
This commit is contained in:
parent
24630e0c9b
commit
1eb078d0a8
10 changed files with 85 additions and 65 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
)
|
||||
|
||||
|
@ -47,18 +48,17 @@ func (a Action) GetRepoName() string {
|
|||
return a.RepoName
|
||||
}
|
||||
|
||||
func (a Action) GetBranch() string {
|
||||
return a.RefName
|
||||
}
|
||||
|
||||
func (a Action) GetContent() string {
|
||||
return a.Content
|
||||
}
|
||||
|
||||
type PushCommits struct {
|
||||
Len int
|
||||
Commits [][]string
|
||||
}
|
||||
|
||||
// CommitRepoAction records action for commit repository.
|
||||
func CommitRepoAction(userId int64, userName string,
|
||||
repoId int64, repoName string, refName string, commits *PushCommits) error {
|
||||
repoId int64, repoName string, refName string, commits *base.PushCommits) error {
|
||||
bs, err := json.Marshal(commits)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue