This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v1.0 by this push:
     new ebddfe379 chore: print log when skipping github run (#7818) (#7819)
ebddfe379 is described below

commit ebddfe379ba88cf2634c973de7bcd7757f4044ea
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Aug 1 15:57:35 2024 +0800

    chore: print log when skipping github run (#7818) (#7819)
    
    Co-authored-by: Klesh Wong <[email protected]>
---
 backend/plugins/github/tasks/cicd_run_collector.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/backend/plugins/github/tasks/cicd_run_collector.go 
b/backend/plugins/github/tasks/cicd_run_collector.go
index 85ef6108b..68bd0aa15 100644
--- a/backend/plugins/github/tasks/cicd_run_collector.go
+++ b/backend/plugins/github/tasks/cicd_run_collector.go
@@ -58,6 +58,7 @@ var CollectRunsMeta = plugin.SubTaskMeta{
 
 func CollectRuns(taskCtx plugin.SubTaskContext) errors.Error {
        data := taskCtx.GetData().(*GithubTaskData)
+       log := taskCtx.GetLogger()
        collector, err := 
helper.NewStatefulApiCollectorForFinalizableEntity(helper.FinalizableApiCollectorArgs{
                RawDataSubTaskArgs: helper.RawDataSubTaskArgs{
                        Ctx: taskCtx,
@@ -100,6 +101,8 @@ func CollectRuns(taskCtx plugin.SubTaskContext) 
errors.Error {
                                                                return nil, 
errors.Convert(err)
                                                        }
                                                        filteredRuns = 
append(filteredRuns, json.RawMessage(runJSON))
+                                               } else {
+                                                       log.Info("Skipping 
run{id: %d, number: %d} with status %s", run.ID, run.RunNumber, run.Status)
                                                }
                                        }
                                        return filteredRuns, nil

Reply via email to