@@ -166,6 +166,7 @@ func (r *generateRunner) run(ctx context.Context) error {
166166 }
167167 idToCommits [libraryID ] = oldCommit
168168 } else {
169+ succeededGenerations := 0
169170 failedGenerations := 0
170171 for _ , library := range r .state .Libraries {
171172 oldCommit , err := r .generateSingleLibrary (ctx , library .ID , outputDir )
@@ -177,9 +178,15 @@ func (r *generateRunner) run(ctx context.Context) error {
177178 // Only add the mapping if library generation is successful so that
178179 // failed library will not appear in generation PR body.
179180 idToCommits [library .ID ] = oldCommit
181+ succeededGenerations ++
180182 }
181183 }
182- slog .Info ("generation statistics" , "all" , len (r .state .Libraries ), "failures" , failedGenerations )
184+
185+ slog .Info (
186+ "generation statistics" ,
187+ "all" , len (r .state .Libraries ),
188+ "successes" , succeededGenerations ,
189+ "failures" , failedGenerations )
183190 if failedGenerations > 0 && failedGenerations == len (r .state .Libraries ) {
184191 return fmt .Errorf ("all %d libraries failed to generate" , failedGenerations )
185192 }
@@ -199,10 +206,8 @@ func (r *generateRunner) run(ctx context.Context) error {
199206 commitMessage : "chore: generate libraries" ,
200207 prType : generate ,
201208 }
202- if err := commitAndPush (ctx , commitInfo ); err != nil {
203- return err
204- }
205- return nil
209+
210+ return commitAndPush (ctx , commitInfo )
206211}
207212
208213// generateSingleLibrary manages the generation of a single client library.
0 commit comments