@@ -388,8 +388,13 @@ func handlePushEvent(gh utils.GithubClientProvider, payload *github.PushEvent) e
388388}
389389
390390func handlePullRequestEvent (gh utils.GithubClientProvider , payload * github.PullRequestEvent , ciBackendProvider ci_backends.CiBackendProvider ) error {
391+ appId , err := strconv .ParseInt (os .Getenv ("GITHUB_APP_ID" ), 10 , 64 )
392+ if err != nil {
393+ log .Printf ("error getting github app isntallation id: %v" , err )
394+ return fmt .Errorf ("error getting github app installation id" )
395+ }
396+
391397 installationId := * payload .Installation .ID
392- appId := * payload .Installation .AppID
393398 repoName := * payload .Repo .Name
394399 repoOwner := * payload .Repo .Owner .Login
395400 repoFullName := * payload .Repo .FullName
@@ -697,8 +702,13 @@ func getBatchType(jobs []orchestrator_scheduler.Job) orchestrator_scheduler.Digg
697702}
698703
699704func handleIssueCommentEvent (gh utils.GithubClientProvider , payload * github.IssueCommentEvent , ciBackendProvider ci_backends.CiBackendProvider ) error {
705+ appId , err := strconv .ParseInt (os .Getenv ("GITHUB_APP_ID" ), 10 , 64 )
706+ if err != nil {
707+ log .Printf ("error getting github app isntallation id: %v" , err )
708+ return fmt .Errorf ("error getting github app installation id" )
709+ }
710+
700711 installationId := * payload .Installation .ID
701- appId := * payload .Installation .AppID
702712 repoName := * payload .Repo .Name
703713 repoOwner := * payload .Repo .Owner .Login
704714 repoFullName := * payload .Repo .FullName
0 commit comments