Move PushUpdateOptions from models to repofiles (#9124)

This commit is contained in:
Lunny Xiao 2019-11-29 10:21:05 +08:00 committed by GitHub
parent 54dab5aed9
commit e151674cfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View file

@ -159,7 +159,7 @@ func HookPostReceive(ctx *macaron.Context) {
})
return
}
if err := repofiles.PushUpdate(repo, branch, models.PushUpdateOptions{
if err := repofiles.PushUpdate(repo, branch, repofiles.PushUpdateOptions{
RefFullName: refFullName,
OldCommitID: oldCommitID,
NewCommitID: newCommitID,

View file

@ -18,7 +18,7 @@ import (
// PushUpdate update public key updates
func PushUpdate(ctx *macaron.Context) {
var opt models.PushUpdateOptions
var opt repofiles.PushUpdateOptions
if err := json.NewDecoder(ctx.Req.Request.Body).Decode(&opt); err != nil {
ctx.JSON(500, map[string]interface{}{
"err": err.Error(),

View file

@ -137,7 +137,7 @@ func deleteBranch(ctx *context.Context, branchName string) error {
if err := repofiles.PushUpdate(
ctx.Repo.Repository,
branchName,
models.PushUpdateOptions{
repofiles.PushUpdateOptions{
RefFullName: git.BranchPrefix + branchName,
OldCommitID: commit.ID.String(),
NewCommitID: git.EmptySHA,