@@ -435,13 +435,39 @@ func enqueueRescueRun(ctx context.Context, pendingRun datastore.PendingWorkflowR
435435 continue
436436 }
437437
438+ // Get installation ID from target scope
439+ installationID , err := gh .IsInstalledGitHubApp (ctx , target .Scope )
440+ if err != nil {
441+ return fmt .Errorf ("failed to get installation ID: %w" , err )
442+ }
443+
444+ // Get full installation data from cache
445+ installation , err := gh .GetInstallationByID (ctx , installationID )
446+ if err != nil {
447+ logger .Logf (false , "failed to get installation from cache (installationID: %d), using minimal data: %+v" , installationID , err )
448+ // Fallback to minimal installation data
449+ installation = & github.Installation {
450+ ID : & installationID ,
451+ }
452+ }
453+
454+ owner := pendingRun .WorkflowRun .GetRepository ().GetOwner ()
455+ var org * github.Organization
456+ if owner != nil {
457+ org = & github.Organization {
458+ ID : owner .ID ,
459+ Login : owner .Login ,
460+ Name : owner .Name ,
461+ }
462+ }
463+
438464 event := & github.WorkflowJobEvent {
439465 WorkflowJob : job ,
440466 Action : github .String ("queued" ),
441- Org : nil ,
467+ Org : org ,
442468 Repo : pendingRun .WorkflowRun .GetRepository (),
443- Sender : nil ,
444- Installation : nil ,
469+ Sender : pendingRun . WorkflowRun . GetActor () ,
470+ Installation : installation ,
445471 }
446472
447473 if err := enqueueRescueJob (ctx , event , * target , ds ); err != nil {
0 commit comments