@@ -125,10 +125,30 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, pr *tektonv1.PipelineRun
125
125
126
126
ctx = info .StoreCurrentControllerName (ctx , r .run .Info .Controller .Name )
127
127
128
- logger = logger . With (
128
+ logFields := [] interface {}{
129
129
"pipeline-run" , pr .GetName (),
130
130
"event-sha" , pr .GetAnnotations ()[keys .SHA ],
131
- )
131
+ }
132
+
133
+ // Add source repository URL if available
134
+ if repoURL := pr .GetAnnotations ()[keys .RepoURL ]; repoURL != "" {
135
+ logFields = append (logFields , "source-repo-url" , repoURL )
136
+ }
137
+
138
+ // Add branch information if available
139
+ if targetBranch := pr .GetAnnotations ()[keys .Branch ]; targetBranch != "" {
140
+ logFields = append (logFields , "target-branch" , targetBranch )
141
+ if sourceBranch := pr .GetAnnotations ()[keys .SourceBranch ]; sourceBranch != "" && sourceBranch != targetBranch {
142
+ logFields = append (logFields , "source-branch" , sourceBranch )
143
+ }
144
+ }
145
+
146
+ // Add event type information if available
147
+ if eventType := pr .GetAnnotations ()[keys .EventType ]; eventType != "" {
148
+ logFields = append (logFields , "event-type" , eventType )
149
+ }
150
+
151
+ logger = logger .With (logFields ... )
132
152
logger .Infof ("pipelineRun %v/%v is done, reconciling to report status! " , pr .GetNamespace (), pr .GetName ())
133
153
r .eventEmitter .SetLogger (logger )
134
154
0 commit comments