@@ -213,27 +213,18 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
213213 }
214214 }
215215
216- if * e .WorkflowJob .Conclusion == "success" {
217- trackedRepositories := map [string ]bool {
218- "client" : true ,
219- "client-dev" : true ,
220- }
221-
222- if _ , ok := trackedRepositories [repoName ]; ok {
223- for _ , step := range e .WorkflowJob .Steps {
224- stepLabels := extraLabel ("step_name" , * step .Name , labels )
225- stepLabels ["step_number" ] = fmt .Sprint (step .Number )
226- stepLabels ["step_conclusion" ] = * step .Conclusion
227- stepLabels ["step_status" ] = * step .Status
216+ if * e .WorkflowJob .Conclusion == "success" && repoName == "client" {
217+ for _ , step := range e .WorkflowJob .Steps {
218+ stepLabels := extraLabel ("step_name" , * step .Name , labels )
219+ stepLabels ["step_number" ] = fmt .Sprint (step .Number )
220+ stepLabels ["step_conclusion" ] = * step .Conclusion
221+ stepLabels ["step_status" ] = * step .Status
228222
229- stepDuration := step .CompletedAt .Sub (step .StartedAt .Time )
223+ stepDuration := step .CompletedAt .Sub (step .StartedAt .Time )
230224
231- githubWorkflowJobStepDurationSeconds .With (stepLabels ).Observe (stepDuration .Seconds ())
225+ githubWorkflowJobStepDurationSeconds .With (stepLabels ).Observe (stepDuration .Seconds ())
232226
233- log .Info ("processed step" , "step_name" , * step .Name , "step_conclusion" , * step .Conclusion , "step_duration_seconds" , stepDuration .Seconds ())
234- }
235- } else {
236- log .Info ("skipping the step reporting for the repo" , "repo_name" , repoName )
227+ log .Info ("processed step in the repository" , "repo" , repoName , "step_name" , * step .Name , "step_conclusion" , * step .Conclusion )
237228 }
238229 }
239230 }
0 commit comments