@@ -20,7 +20,7 @@ import (
20
20
)
21
21
22
22
// ProcRecive handle proc receive work
23
- func ProcRecive (ctx * context.PrivateContext , opts * private.HookOptions ) []private.HockProcReceiveRefResult {
23
+ func ProcRecive (ctx * context.PrivateContext , opts * private.HookOptions ) []private.HookProcReceiveRefResult {
24
24
// TODO: Add more options?
25
25
var (
26
26
topicBranch string
@@ -29,7 +29,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
29
29
forcePush bool
30
30
)
31
31
32
- results := make ([]private.HockProcReceiveRefResult , 0 , len (opts .OldCommitIDs ))
32
+ results := make ([]private.HookProcReceiveRefResult , 0 , len (opts .OldCommitIDs ))
33
33
repo := ctx .Repo .Repository
34
34
gitRepo := ctx .Repo .GitRepo
35
35
ownerName := ctx .Repo .Repository .OwnerName
@@ -40,7 +40,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
40
40
41
41
for i := range opts .OldCommitIDs {
42
42
if opts .NewCommitIDs [i ] == git .EmptySHA {
43
- results = append (results , private.HockProcReceiveRefResult {
43
+ results = append (results , private.HookProcReceiveRefResult {
44
44
OriginalRef : opts .RefFullNames [i ],
45
45
OldOID : opts .OldCommitIDs [i ],
46
46
NewOID : opts .NewCommitIDs [i ],
@@ -50,7 +50,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
50
50
}
51
51
52
52
if ! strings .HasPrefix (opts .RefFullNames [i ], git .PullRequestPrefix ) {
53
- results = append (results , private.HockProcReceiveRefResult {
53
+ results = append (results , private.HookProcReceiveRefResult {
54
54
IsNotMatched : true ,
55
55
OriginalRef : opts .RefFullNames [i ],
56
56
})
@@ -71,7 +71,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
71
71
}
72
72
73
73
if len (topicBranch ) == 0 && len (curentTopicBranch ) == 0 {
74
- results = append (results , private.HockProcReceiveRefResult {
74
+ results = append (results , private.HookProcReceiveRefResult {
75
75
OriginalRef : opts .RefFullNames [i ],
76
76
OldOID : opts .OldCommitIDs [i ],
77
77
NewOID : opts .NewCommitIDs [i ],
@@ -166,7 +166,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
166
166
167
167
log .Trace ("Pull request created: %d/%d" , repo .ID , prIssue .ID )
168
168
169
- results = append (results , private.HockProcReceiveRefResult {
169
+ results = append (results , private.HookProcReceiveRefResult {
170
170
Ref : pr .GetGitRefName (),
171
171
OriginalRef : opts .RefFullNames [i ],
172
172
OldOID : git .EmptySHA ,
@@ -194,7 +194,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
194
194
}
195
195
196
196
if oldCommitID == opts .NewCommitIDs [i ] {
197
- results = append (results , private.HockProcReceiveRefResult {
197
+ results = append (results , private.HookProcReceiveRefResult {
198
198
OriginalRef : opts .RefFullNames [i ],
199
199
OldOID : opts .OldCommitIDs [i ],
200
200
NewOID : opts .NewCommitIDs [i ],
@@ -212,7 +212,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
212
212
})
213
213
return nil
214
214
} else if len (output ) > 0 {
215
- results = append (results , private.HockProcReceiveRefResult {
215
+ results = append (results , private.HookProcReceiveRefResult {
216
216
OriginalRef : oldCommitID ,
217
217
OldOID : opts .OldCommitIDs [i ],
218
218
NewOID : opts .NewCommitIDs [i ],
@@ -255,7 +255,7 @@ func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []privat
255
255
notification .NotifyPullRequestSynchronized (pusher , pr )
256
256
isForcePush := comment != nil && comment .IsForcePush
257
257
258
- results = append (results , private.HockProcReceiveRefResult {
258
+ results = append (results , private.HookProcReceiveRefResult {
259
259
OldOID : oldCommitID ,
260
260
NewOID : opts .NewCommitIDs [i ],
261
261
Ref : pr .GetGitRefName (),
0 commit comments