@@ -651,50 +651,35 @@ func (p *Plugin) postIssueEvent(event *github.IssuesEvent) {
651651
652652func (p * Plugin ) postPushEvent (event * github.PushEvent ) {
653653 repo := event .GetRepo ()
654- fmt .Println ("postPushEvent 1" )
655654
656655 subs := p .GetSubscribedChannelsForRepository (ConvertPushEventRepositoryToRepository (repo ))
657- fmt .Println ("postPushEvent 2" )
658656 if len (subs ) == 0 {
659- fmt .Println ("postPushEvent 3" )
660657 return
661658 }
662659
663660 commits := event .Commits
664- fmt .Println ("postPushEvent 4" )
665661 if len (commits ) == 0 {
666- fmt .Println ("postPushEvent 5" )
667662 return
668663 }
669664
670665 setShowAuthorInCommitNotification (p .configuration .ShowAuthorInCommitNotification )
671- fmt .Println ("postPushEvent 6" )
672666 pushedCommitsMessage , err := renderTemplate ("pushedCommits" , event )
673- fmt .Println ("postPushEvent 7" )
674667 if err != nil {
675- fmt .Println ("postPushEvent 8" )
676668 p .client .Log .Warn ("Failed to render template" , "error" , err .Error ())
677669 return
678670 }
679671
680672 for _ , sub := range subs {
681- fmt .Println ("postPushEvent 9" )
682673 if ! sub .Pushes () {
683- fmt .Println ("postPushEvent 10" )
684674 continue
685675 }
686- fmt .Println ("postPushEvent 11" )
687676 if p .excludeConfigOrgMember (event .GetSender (), sub ) {
688- fmt .Println ("postPushEvent 12" )
689677 continue
690678 }
691- fmt .Println ("postPushEvent 13" )
692679 post := p .makeBotPost (pushedCommitsMessage , "custom_git_push" )
693680
694681 post .ChannelId = sub .ChannelID
695- fmt .Println ("postPushEvent 14" )
696682 if err = p .client .Post .CreatePost (post ); err != nil {
697- fmt .Println ("postPushEvent 15" )
698683 p .client .Log .Warn ("Error webhook post" , "post" , post , "error" , err .Error ())
699684 }
700685 }
0 commit comments