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

likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 6b6307f22 fix(github): minor bugs (#4012)
6b6307f22 is described below

commit 6b6307f227138e7624d822b627323e352b386c28
Author: Warren Chen <[email protected]>
AuthorDate: Thu Dec 22 15:19:35 2022 +0800

    fix(github): minor bugs (#4012)
---
 .../e2e/snapshot_tables/_tool_github_jobs.csv      | 40 +++++++++++-----------
 plugins/github/tasks/cicd_job_convertor.go         |  8 ++---
 plugins/github/tasks/cicd_job_extractor.go         |  5 +--
 .../github_graphql/tasks/check_run_collector.go    |  5 +--
 4 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_jobs.csv 
b/plugins/github/e2e/snapshot_tables/_tool_github_jobs.csv
index d5edfd115..9ff8cdd21 100644
--- a/plugins/github/e2e/snapshot_tables/_tool_github_jobs.csv
+++ b/plugins/github/e2e/snapshot_tables/_tool_github_jobs.csv
@@ -1,21 +1,21 @@
 
connection_id,repo_id,id,run_id,run_url,node_id,head_sha,url,html_url,status,conclusion,started_at,completed_at,name,steps,check_run_url,labels,runner_id,runner_name,runner_group_id,type
-1,134018330,1924918168,577324558,https://api.github.com/repos/panjf2000/ants/actions/runs/577324558,MDg6Q2hlY2tSdW4xOTI0OTE4MTY4,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918168,https://github.com/panjf2000/ants/runs/1924918168?check_suite_focus=true,completed,success,2021-02-18T06:59:13.000+00:00,2021-02-18T06:59:33.000+00:00,Golangci-Lint,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
-1,134018330,1924918171,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MTcx,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918171,https://github.com/panjf2000/ants/runs/1924918171?check_suite_focus=true,completed,cancelled,2021-02-18T06:59:13.000+00:00,2021-02-18T07:01:18.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": " 
[...]
-1,134018330,1924918191,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MTkx,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918191,https://github.com/panjf2000/ants/runs/1924918191?check_suite_focus=true,completed,cancelled,2021-02-18T06:59:21.000+00:00,2021-02-18T07:01:18.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
-1,134018330,1924918205,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjA1,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918205,https://github.com/panjf2000/ants/runs/1924918205?check_suite_focus=true,completed,cancelled,2021-02-18T06:59:15.000+00:00,2021-02-18T07:01:09.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"":  
[...]
-1,134018330,1924918228,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjI4,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918228,https://github.com/panjf2000/ants/runs/1924918228?check_suite_focus=true,completed,cancelled,2021-02-18T06:59:13.000+00:00,2021-02-18T07:01:18.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": " 
[...]
-1,134018330,1924918243,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjQz,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918243,https://github.com/panjf2000/ants/runs/1924918243?check_suite_focus=true,completed,cancelled,2021-02-18T06:59:19.000+00:00,2021-02-18T07:01:18.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
-1,134018330,1924918261,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjYx,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918261,https://github.com/panjf2000/ants/runs/1924918261?check_suite_focus=true,completed,cancelled,2021-02-18T06:59:15.000+00:00,2021-02-18T07:01:09.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"":  
[...]
-1,134018330,1924918319,577324571,https://api.github.com/repos/panjf2000/ants/actions/runs/577324571,MDg6Q2hlY2tSdW4xOTI0OTE4MzE5,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918319,https://github.com/panjf2000/ants/runs/1924918319?check_suite_focus=true,completed,success,2021-02-18T06:59:16.000+00:00,2021-02-18T07:00:17.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
-1,134018330,1924932184,577330055,https://api.github.com/repos/panjf2000/ants/actions/runs/577330055,MDg6Q2hlY2tSdW4xOTI0OTMyMTg0,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932184,https://github.com/panjf2000/ants/runs/1924932184?check_suite_focus=true,completed,success,2021-02-18T07:02:02.000+00:00,2021-02-18T07:02:56.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
-1,134018330,1924932219,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjE5,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932219,https://github.com/panjf2000/ants/runs/1924932219?check_suite_focus=true,completed,success,2021-02-18T07:02:03.000+00:00,2021-02-18T07:05:03.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": ""s 
[...]
-1,134018330,1924932237,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjM3,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932237,https://github.com/panjf2000/ants/runs/1924932237?check_suite_focus=true,in_progress,,2021-02-18T07:02:06.000+00:00,2021-02-18T07:04:44.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""success [...]
-1,134018330,1924932251,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjUx,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932251,https://github.com/panjf2000/ants/runs/1924932251?check_suite_focus=true,in_progress,,2021-02-18T07:02:03.000+00:00,2021-02-18T07:05:57.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succe [...]
-1,134018330,1924932263,577330057,https://api.github.com/repos/panjf2000/ants/actions/runs/577330057,MDg6Q2hlY2tSdW4xOTI0OTMyMjYz,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932263,https://github.com/panjf2000/ants/runs/1924932263?check_suite_focus=true,completed,failure,2021-02-18T07:02:05.000+00:00,2021-02-18T07:02:19.000+00:00,Golangci-Lint,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
-1,134018330,1924932266,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjY2,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932266,https://github.com/panjf2000/ants/runs/1924932266?check_suite_focus=true,completed,success,2021-02-18T07:02:03.000+00:00,2021-02-18T07:04:44.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": ""s 
[...]
-1,134018330,1924932293,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjkz,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932293,https://github.com/panjf2000/ants/runs/1924932293?check_suite_focus=true,completed,success,2021-02-18T07:02:06.000+00:00,2021-02-18T07:04:44.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": ""su 
[...]
-1,134018330,1924932319,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMzE5,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932319,https://github.com/panjf2000/ants/runs/1924932319?check_suite_focus=true,completed,success,2021-02-18T07:02:03.000+00:00,2021-02-18T07:05:53.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
-1,134018330,1940449839,583528173,https://api.github.com/repos/panjf2000/ants/actions/runs/583528173,MDg6Q2hlY2tSdW4xOTQwNDQ5ODM5,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1940449839,https://github.com/panjf2000/ants/runs/1940449839?check_suite_focus=true,completed,success,2021-02-20T05:10:17.000+00:00,2021-02-20T05:11:12.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
-1,134018330,1992620044,604839350,https://api.github.com/repos/panjf2000/ants/actions/runs/604839350,MDg6Q2hlY2tSdW4xOTkyNjIwMDQ0,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1992620044,https://github.com/panjf2000/ants/runs/1992620044?check_suite_focus=true,completed,failure,2021-02-27T05:10:19.000+00:00,2021-02-27T05:11:20.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
-1,134018330,2011825638,613518923,https://api.github.com/repos/panjf2000/ants/actions/runs/613518923,MDg6Q2hlY2tSdW4yMDExODI1NjM4,5431f73492ade2e5b947a98f6032595c32cf730e,https://api.github.com/repos/panjf2000/ants/actions/jobs/2011825638,https://github.com/panjf2000/ants/runs/2011825638?check_suite_focus=true,completed,success,2021-03-02T09:24:49.000+00:00,2021-03-02T09:25:11.000+00:00,Golangci-Lint,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
-1,134018330,2139659897,664533609,https://api.github.com/repos/panjf2000/ants/actions/runs/664533609,MDg6Q2hlY2tSdW4yMTM5NjU5ODk3,e45d13c6303d4ec82d16cd4111a49a7de0ad0712,https://api.github.com/repos/panjf2000/ants/actions/jobs/2139659897,https://github.com/panjf2000/ants/runs/2139659897?check_suite_focus=true,completed,success,2021-03-18T12:39:24.000+00:00,2021-03-18T12:40:35.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
+1,134018330,1924918168,577324558,https://api.github.com/repos/panjf2000/ants/actions/runs/577324558,MDg6Q2hlY2tSdW4xOTI0OTE4MTY4,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918168,https://github.com/panjf2000/ants/runs/1924918168?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-18T06:59:13.000+00:00,2021-02-18T06:59:33.000+00:00,Golangci-Lint,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
+1,134018330,1924918171,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MTcx,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918171,https://github.com/panjf2000/ants/runs/1924918171?check_suite_focus=true,COMPLETED,CANCELLED,2021-02-18T06:59:13.000+00:00,2021-02-18T07:01:18.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": " 
[...]
+1,134018330,1924918191,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MTkx,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918191,https://github.com/panjf2000/ants/runs/1924918191?check_suite_focus=true,COMPLETED,CANCELLED,2021-02-18T06:59:21.000+00:00,2021-02-18T07:01:18.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
+1,134018330,1924918205,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjA1,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918205,https://github.com/panjf2000/ants/runs/1924918205?check_suite_focus=true,COMPLETED,CANCELLED,2021-02-18T06:59:15.000+00:00,2021-02-18T07:01:09.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"":  
[...]
+1,134018330,1924918228,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjI4,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918228,https://github.com/panjf2000/ants/runs/1924918228?check_suite_focus=true,COMPLETED,CANCELLED,2021-02-18T06:59:13.000+00:00,2021-02-18T07:01:18.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": " 
[...]
+1,134018330,1924918243,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjQz,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918243,https://github.com/panjf2000/ants/runs/1924918243?check_suite_focus=true,COMPLETED,CANCELLED,2021-02-18T06:59:19.000+00:00,2021-02-18T07:01:18.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
+1,134018330,1924918261,577324554,https://api.github.com/repos/panjf2000/ants/actions/runs/577324554,MDg6Q2hlY2tSdW4xOTI0OTE4MjYx,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918261,https://github.com/panjf2000/ants/runs/1924918261?check_suite_focus=true,COMPLETED,CANCELLED,2021-02-18T06:59:15.000+00:00,2021-02-18T07:01:09.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"":  
[...]
+1,134018330,1924918319,577324571,https://api.github.com/repos/panjf2000/ants/actions/runs/577324571,MDg6Q2hlY2tSdW4xOTI0OTE4MzE5,cb4adab28f63313592a9a395656b8413184ea336,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924918319,https://github.com/panjf2000/ants/runs/1924918319?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-18T06:59:16.000+00:00,2021-02-18T07:00:17.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
+1,134018330,1924932184,577330055,https://api.github.com/repos/panjf2000/ants/actions/runs/577330055,MDg6Q2hlY2tSdW4xOTI0OTMyMTg0,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932184,https://github.com/panjf2000/ants/runs/1924932184?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-18T07:02:02.000+00:00,2021-02-18T07:02:56.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
+1,134018330,1924932219,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjE5,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932219,https://github.com/panjf2000/ants/runs/1924932219?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-18T07:02:03.000+00:00,2021-02-18T07:05:03.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": ""s 
[...]
+1,134018330,1924932237,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjM3,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932237,https://github.com/panjf2000/ants/runs/1924932237?check_suite_focus=true,IN_PROGRESS,,2021-02-18T07:02:06.000+00:00,2021-02-18T07:04:44.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""success [...]
+1,134018330,1924932251,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjUx,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932251,https://github.com/panjf2000/ants/runs/1924932251?check_suite_focus=true,IN_PROGRESS,,2021-02-18T07:02:03.000+00:00,2021-02-18T07:05:57.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succe [...]
+1,134018330,1924932263,577330057,https://api.github.com/repos/panjf2000/ants/actions/runs/577330057,MDg6Q2hlY2tSdW4xOTI0OTMyMjYz,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932263,https://github.com/panjf2000/ants/runs/1924932263?check_suite_focus=true,COMPLETED,FAILURE,2021-02-18T07:02:05.000+00:00,2021-02-18T07:02:19.000+00:00,Golangci-Lint,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
+1,134018330,1924932266,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjY2,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932266,https://github.com/panjf2000/ants/runs/1924932266?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-18T07:02:03.000+00:00,2021-02-18T07:04:44.000+00:00,deployubuntu,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": ""s 
[...]
+1,134018330,1924932293,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMjkz,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932293,https://github.com/panjf2000/ants/runs/1924932293?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-18T07:02:06.000+00:00,2021-02-18T07:04:44.000+00:00,deploymacos,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": ""su 
[...]
+1,134018330,1924932319,577330056,https://api.github.com/repos/panjf2000/ants/actions/runs/577330056,MDg6Q2hlY2tSdW4xOTI0OTMyMzE5,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1924932319,https://github.com/panjf2000/ants/runs/1924932319?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-18T07:02:03.000+00:00,2021-02-18T07:05:53.000+00:00,deploywindows,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
+1,134018330,1940449839,583528173,https://api.github.com/repos/panjf2000/ants/actions/runs/583528173,MDg6Q2hlY2tSdW4xOTQwNDQ5ODM5,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1940449839,https://github.com/panjf2000/ants/runs/1940449839?check_suite_focus=true,COMPLETED,SUCCESS,2021-02-20T05:10:17.000+00:00,2021-02-20T05:11:12.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
+1,134018330,1992620044,604839350,https://api.github.com/repos/panjf2000/ants/actions/runs/604839350,MDg6Q2hlY2tSdW4xOTkyNjIwMDQ0,fd8d670fd09489e6ea7693c0a382ba85d2694f16,https://api.github.com/repos/panjf2000/ants/actions/jobs/1992620044,https://github.com/panjf2000/ants/runs/1992620044?check_suite_focus=true,COMPLETED,FAILURE,2021-02-27T05:10:19.000+00:00,2021-02-27T05:11:20.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
+1,134018330,2011825638,613518923,https://api.github.com/repos/panjf2000/ants/actions/runs/613518923,MDg6Q2hlY2tSdW4yMDExODI1NjM4,5431f73492ade2e5b947a98f6032595c32cf730e,https://api.github.com/repos/panjf2000/ants/actions/jobs/2011825638,https://github.com/panjf2000/ants/runs/2011825638?check_suite_focus=true,COMPLETED,SUCCESS,2021-03-02T09:24:49.000+00:00,2021-03-02T09:25:11.000+00:00,Golangci-Lint,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": "" 
[...]
+1,134018330,2139659897,664533609,https://api.github.com/repos/panjf2000/ants/actions/runs/664533609,MDg6Q2hlY2tSdW4yMTM5NjU5ODk3,e45d13c6303d4ec82d16cd4111a49a7de0ad0712,https://api.github.com/repos/panjf2000/ants/actions/jobs/2139659897,https://github.com/panjf2000/ants/runs/2139659897?check_suite_focus=true,COMPLETED,SUCCESS,2021-03-18T12:39:24.000+00:00,2021-03-18T12:40:35.000+00:00,Analyze,"[{""name"":
 ""Set up job"", ""number"": 1, ""status"": ""completed"", ""conclusion"": 
""succes [...]
diff --git a/plugins/github/tasks/cicd_job_convertor.go 
b/plugins/github/tasks/cicd_job_convertor.go
index 07c829342..dc90a46a8 100644
--- a/plugins/github/tasks/cicd_job_convertor.go
+++ b/plugins/github/tasks/cicd_job_convertor.go
@@ -95,17 +95,17 @@ func ConvertJobs(taskCtx core.SubTaskContext) (err 
errors.Error) {
                        domainJob.Type = 
regexEnricher.GetEnrichResult(deploymentPattern, line.Name, devops.DEPLOYMENT)
                        domainJob.Environment = 
regexEnricher.GetEnrichResult(productionPattern, line.Name, devops.PRODUCTION)
 
-                       if strings.Contains(line.Conclusion, "success") {
+                       if strings.Contains(line.Conclusion, "SUCCESS") {
                                domainJob.Result = devops.SUCCESS
-                       } else if strings.Contains(line.Conclusion, "failure") {
+                       } else if strings.Contains(line.Conclusion, "FAILURE") {
                                domainJob.Result = devops.FAILURE
-                       } else if strings.Contains(line.Conclusion, "abort") {
+                       } else if strings.Contains(line.Conclusion, "ABORT") {
                                domainJob.Result = devops.ABORT
                        } else {
                                domainJob.Result = ""
                        }
 
-                       if line.Status != "completed" {
+                       if line.Status != "COMPLETED" {
                                domainJob.Status = devops.IN_PROGRESS
                        } else {
                                domainJob.Status = devops.DONE
diff --git a/plugins/github/tasks/cicd_job_extractor.go 
b/plugins/github/tasks/cicd_job_extractor.go
index ff3144162..02000dad7 100644
--- a/plugins/github/tasks/cicd_job_extractor.go
+++ b/plugins/github/tasks/cicd_job_extractor.go
@@ -23,6 +23,7 @@ import (
        "github.com/apache/incubator-devlake/plugins/core"
        "github.com/apache/incubator-devlake/plugins/github/models"
        "github.com/apache/incubator-devlake/plugins/helper"
+       "strings"
 )
 
 var ExtractJobsMeta = core.SubTaskMeta{
@@ -64,8 +65,8 @@ func ExtractJobs(taskCtx core.SubTaskContext) errors.Error {
                                HeadSha:       githubJob.HeadSha,
                                URL:           githubJob.URL,
                                HTMLURL:       githubJob.HTMLURL,
-                               Status:        githubJob.Status,
-                               Conclusion:    githubJob.Conclusion,
+                               Status:        
strings.ToUpper(githubJob.Status),
+                               Conclusion:    
strings.ToUpper(githubJob.Conclusion),
                                StartedAt:     githubJob.StartedAt,
                                CompletedAt:   githubJob.CompletedAt,
                                Name:          githubJob.Name,
diff --git a/plugins/github_graphql/tasks/check_run_collector.go 
b/plugins/github_graphql/tasks/check_run_collector.go
index 166ef4efe..3c0d1cbdd 100644
--- a/plugins/github_graphql/tasks/check_run_collector.go
+++ b/plugins/github_graphql/tasks/check_run_collector.go
@@ -27,6 +27,7 @@ import (
        "github.com/apache/incubator-devlake/plugins/helper"
        "github.com/merico-dev/graphql"
        "reflect"
+       "strings"
        "time"
 )
 
@@ -162,8 +163,8 @@ func CollectCheckRun(taskCtx core.SubTaskContext) 
errors.Error {
                                                ID:           
checkRun.DatabaseId,
                                                NodeID:       checkRun.Id,
                                                HTMLURL:      
checkRun.DetailsUrl,
-                                               Status:       checkRun.Status,
-                                               Conclusion:   
checkRun.Conclusion,
+                                               Status:       
strings.ToUpper(checkRun.Status),
+                                               Conclusion:   
strings.ToUpper(checkRun.Conclusion),
                                                StartedAt:    
checkRun.StartedAt,
                                                CompletedAt:  
checkRun.CompletedAt,
                                                Name:         checkRun.Name,

Reply via email to