@@ -23,67 +23,67 @@ type PushUpdateOptions struct {
2323}
2424
2525// IsNewRef return true if it's a first-time push to a branch, tag or etc.
26- func (opts PushUpdateOptions ) IsNewRef () bool {
26+ func (opts * PushUpdateOptions ) IsNewRef () bool {
2727 return opts .OldCommitID == git .EmptySHA
2828}
2929
3030// IsDelRef return true if it's a deletion to a branch or tag
31- func (opts PushUpdateOptions ) IsDelRef () bool {
31+ func (opts * PushUpdateOptions ) IsDelRef () bool {
3232 return opts .NewCommitID == git .EmptySHA
3333}
3434
3535// IsUpdateRef return true if it's an update operation
36- func (opts PushUpdateOptions ) IsUpdateRef () bool {
36+ func (opts * PushUpdateOptions ) IsUpdateRef () bool {
3737 return ! opts .IsNewRef () && ! opts .IsDelRef ()
3838}
3939
4040// IsTag return true if it's an operation to a tag
41- func (opts PushUpdateOptions ) IsTag () bool {
41+ func (opts * PushUpdateOptions ) IsTag () bool {
4242 return strings .HasPrefix (opts .RefFullName , git .TagPrefix )
4343}
4444
4545// IsNewTag return true if it's a creation to a tag
46- func (opts PushUpdateOptions ) IsNewTag () bool {
46+ func (opts * PushUpdateOptions ) IsNewTag () bool {
4747 return opts .IsTag () && opts .IsNewRef ()
4848}
4949
5050// IsDelTag return true if it's a deletion to a tag
51- func (opts PushUpdateOptions ) IsDelTag () bool {
51+ func (opts * PushUpdateOptions ) IsDelTag () bool {
5252 return opts .IsTag () && opts .IsDelRef ()
5353}
5454
5555// IsBranch return true if it's a push to branch
56- func (opts PushUpdateOptions ) IsBranch () bool {
56+ func (opts * PushUpdateOptions ) IsBranch () bool {
5757 return strings .HasPrefix (opts .RefFullName , git .BranchPrefix )
5858}
5959
6060// IsNewBranch return true if it's the first-time push to a branch
61- func (opts PushUpdateOptions ) IsNewBranch () bool {
61+ func (opts * PushUpdateOptions ) IsNewBranch () bool {
6262 return opts .IsBranch () && opts .IsNewRef ()
6363}
6464
6565// IsUpdateBranch return true if it's not the first push to a branch
66- func (opts PushUpdateOptions ) IsUpdateBranch () bool {
66+ func (opts * PushUpdateOptions ) IsUpdateBranch () bool {
6767 return opts .IsBranch () && opts .IsUpdateRef ()
6868}
6969
7070// IsDelBranch return true if it's a deletion to a branch
71- func (opts PushUpdateOptions ) IsDelBranch () bool {
71+ func (opts * PushUpdateOptions ) IsDelBranch () bool {
7272 return opts .IsBranch () && opts .IsDelRef ()
7373}
7474
7575// TagName returns simple tag name if it's an operation to a tag
76- func (opts PushUpdateOptions ) TagName () string {
76+ func (opts * PushUpdateOptions ) TagName () string {
7777 return opts .RefFullName [len (git .TagPrefix ):]
7878}
7979
8080// BranchName returns simple branch name if it's an operation to branch
81- func (opts PushUpdateOptions ) BranchName () string {
81+ func (opts * PushUpdateOptions ) BranchName () string {
8282 return opts .RefFullName [len (git .BranchPrefix ):]
8383}
8484
8585// RefName returns simple name for ref
86- func (opts PushUpdateOptions ) RefName () string {
86+ func (opts * PushUpdateOptions ) RefName () string {
8787 if strings .HasPrefix (opts .RefFullName , git .TagPrefix ) {
8888 return opts .RefFullName [len (git .TagPrefix ):]
8989 } else if strings .HasPrefix (opts .RefFullName , git .BranchPrefix ) {
@@ -93,7 +93,7 @@ func (opts PushUpdateOptions) RefName() string {
9393}
9494
9595// RepoFullName returns repo full name
96- func (opts PushUpdateOptions ) RepoFullName () string {
96+ func (opts * PushUpdateOptions ) RepoFullName () string {
9797 return opts .RepoUserName + "/" + opts .RepoName
9898}
9999
0 commit comments