File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,19 @@ func send(commit Commit) error {
59
59
req .Header .Set ("X-Token" , os .Getenv ("TOKEN" ))
60
60
req .Header .Set ("Content-Type" , "application/json" )
61
61
62
- if _ , err := client .Do (req ); err != nil {
62
+ response , err := client .Do (req )
63
63
64
- fmt .Printf ("Error when sending a commit to Postgres-CI (err: %v)\n " , err )
64
+ if err != nil {
65
+
66
+ fmt .Printf ("Error when sending a commit to Postgres-CI: %v\n " , err )
65
67
66
68
return nil
67
69
}
68
70
71
+ if response .StatusCode != http .StatusOK {
72
+
73
+ fmt .Printf ("Error when sending a commit to Postgres-CI: %v\n " , response .Status )
74
+ }
75
+
69
76
return nil
70
77
}
Original file line number Diff line number Diff line change @@ -81,12 +81,19 @@ func send(push git.Push) error {
81
81
req .Header .Set ("X-Token" , os .Getenv ("TOKEN" ))
82
82
req .Header .Set ("Content-Type" , "application/json" )
83
83
84
- if _ , err := client .Do (req ); err != nil {
84
+ response , err := client .Do (req )
85
85
86
- fmt .Printf ("Error when sending a commit to Postgres-CI (err: %v)\n " , err )
86
+ if err != nil {
87
+
88
+ fmt .Printf ("Error when sending a push to Postgres-CI: %v\n " , err )
87
89
88
90
return nil
89
91
}
90
92
93
+ if response .StatusCode != http .StatusOK {
94
+
95
+ fmt .Printf ("Error when sending a push to Postgres-CI: %s\n " , response .Status )
96
+ }
97
+
91
98
return nil
92
99
}
You can’t perform that action at this time.
0 commit comments