@@ -169,7 +169,7 @@ func (a *Action) GetIssueTitle() string {
169169 log .Error (4 , "GetIssueByIndex: %v" , err )
170170 return "500 when get issue"
171171 }
172- return issue .Name
172+ return issue .Title
173173}
174174
175175func (a * Action ) GetIssueContent () string {
@@ -513,11 +513,11 @@ func CommitRepoAction(
513513
514514 payloadRepo := repo .ComposePayload ()
515515
516- pusher_email , pusher_name := "" , ""
516+ var pusherEmail , pusherName string
517517 pusher , err := GetUserByName (userName )
518518 if err == nil {
519- pusher_email = pusher .Email
520- pusher_name = pusher .DisplayName ()
519+ pusherEmail = pusher .Email
520+ pusherName = pusher .DisplayName ()
521521 }
522522 payloadSender := & api.PayloadUser {
523523 UserName : pusher .Name ,
@@ -527,21 +527,20 @@ func CommitRepoAction(
527527
528528 switch opType {
529529 case ACTION_COMMIT_REPO : // Push
530- p := & api.PushPayload {
530+ if err = PrepareWebhooks ( repo , HOOK_EVENT_PUSH , & api.PushPayload {
531531 Ref : refFullName ,
532532 Before : oldCommitID ,
533533 After : newCommitID ,
534534 CompareUrl : setting .AppUrl + commit .CompareUrl ,
535535 Commits : commit .ToApiPayloadCommits (repo .FullLink ()),
536536 Repo : payloadRepo ,
537537 Pusher : & api.PayloadAuthor {
538- Name : pusher_name ,
539- Email : pusher_email ,
538+ Name : pusherName ,
539+ Email : pusherEmail ,
540540 UserName : userName ,
541541 },
542542 Sender : payloadSender ,
543- }
544- if err = PrepareWebhooks (repo , HOOK_EVENT_PUSH , p ); err != nil {
543+ }); err != nil {
545544 return fmt .Errorf ("PrepareWebhooks: %v" , err )
546545 }
547546
@@ -603,7 +602,7 @@ func mergePullRequestAction(e Engine, actUser *User, repo *Repository, pull *Iss
603602 ActUserName : actUser .Name ,
604603 ActEmail : actUser .Email ,
605604 OpType : ACTION_MERGE_PULL_REQUEST ,
606- Content : fmt .Sprintf ("%d|%s" , pull .Index , pull .Name ),
605+ Content : fmt .Sprintf ("%d|%s" , pull .Index , pull .Title ),
607606 RepoID : repo .ID ,
608607 RepoUserName : repo .Owner .Name ,
609608 RepoName : repo .Name ,
0 commit comments