@@ -89,8 +89,8 @@ func (r *Repo) CreateDeployment(c *gin.Context) {
89
89
90
90
cf , err := r .i .GetConfig (ctx , u , re )
91
91
if vo .IsConfigNotFoundError (err ) || vo .IsConfigParseError (err ) {
92
- r .log .Warn ("The config is invalid." , zap .Error (err ))
93
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The config is invalid." )
92
+ r .log .Warn ("The configuration is invalid." , zap .Error (err ))
93
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The configuration is invalid." )
94
94
return
95
95
} else if err != nil {
96
96
r .log .Error ("failed to get the configuration file." , zap .Error (err ))
@@ -99,8 +99,8 @@ func (r *Repo) CreateDeployment(c *gin.Context) {
99
99
}
100
100
101
101
if ! cf .HasEnv (p .Env ) {
102
- r .log .Warn ("The env is not defined in the config." , zap .Error (err ))
103
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The env is not defined in the config." )
102
+ r .log .Warn ("The environment is not defined in the config." , zap .Error (err ))
103
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The environment is not defined in the config." )
104
104
return
105
105
}
106
106
@@ -111,8 +111,8 @@ func (r *Repo) CreateDeployment(c *gin.Context) {
111
111
}
112
112
113
113
if locked , err := r .i .HasLockOfRepoForEnv (ctx , re , p .Env ); locked {
114
- r .log .Info ("The env is locked." , zap .String ("env" , p .Env ))
115
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The env is locked. You should unlock the env before deploying ." )
114
+ r .log .Info ("The environment is locked." , zap .String ("env" , p .Env ))
115
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The environment is locked." )
116
116
return
117
117
} else if err != nil {
118
118
r .log .Error ("It has failed to check the lock." , zap .Error (err ))
@@ -141,7 +141,7 @@ func (r *Repo) CreateDeployment(c *gin.Context) {
141
141
return
142
142
} else if vo .IsUnprocessibleDeploymentError (err ) {
143
143
r .log .Warn ("It is unprocessable entity." , zap .Error (err ))
144
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "It is unprocessable entity ." )
144
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "There is a merge conflict or the commit's status checks failed ." )
145
145
return
146
146
} else if err != nil {
147
147
r .log .Error ("failed to deploy." , zap .Error (err ))
@@ -194,8 +194,8 @@ func (r *Repo) UpdateDeployment(c *gin.Context) {
194
194
195
195
cf , err := r .i .GetConfig (ctx , u , re )
196
196
if vo .IsConfigNotFoundError (err ) || vo .IsConfigParseError (err ) {
197
- r .log .Warn ("The config is invalid." , zap .Error (err ))
198
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The config is invalid." )
197
+ r .log .Warn ("The configuration is invalid." , zap .Error (err ))
198
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The configuration is invalid." )
199
199
return
200
200
} else if err != nil {
201
201
r .log .Error ("failed to get the configuration file." , zap .Error (err ))
@@ -204,8 +204,8 @@ func (r *Repo) UpdateDeployment(c *gin.Context) {
204
204
}
205
205
206
206
if ! cf .HasEnv (d .Env ) {
207
- r .log .Warn ("The env is not defined in the config." , zap .Error (err ))
208
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The env is not defined in the config." )
207
+ r .log .Warn ("The environment is not defined in the config." , zap .Error (err ))
208
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The environment is not defined in the config." )
209
209
return
210
210
}
211
211
@@ -216,8 +216,8 @@ func (r *Repo) UpdateDeployment(c *gin.Context) {
216
216
}
217
217
218
218
if locked , err := r .i .HasLockOfRepoForEnv (ctx , re , d .Env ); locked {
219
- r .log .Info ("The env is locked." , zap .String ("env" , d .Env ))
220
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The env is locked. You should unlock the env before deploying ." )
219
+ r .log .Info ("The environment is locked." , zap .String ("env" , d .Env ))
220
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The environment is locked." )
221
221
return
222
222
} else if err != nil {
223
223
r .log .Error ("It has failed to check the lock." , zap .Error (err ))
@@ -236,7 +236,7 @@ func (r *Repo) UpdateDeployment(c *gin.Context) {
236
236
237
237
if d , err = r .i .CreateRemoteDeployment (ctx , u , re , d , cf .GetEnv (d .Env )); vo .IsUnprocessibleDeploymentError (err ) {
238
238
r .log .Warn ("It is unprocessible entity." , zap .Error (err ))
239
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "It is unprocessible entity ." )
239
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "There is a merge conflict or the commit's status checks failed ." )
240
240
return
241
241
} else if err != nil {
242
242
r .log .Error ("It has failed to create the remote deployment." , zap .Error (err ))
@@ -283,8 +283,8 @@ func (r *Repo) RollbackDeployment(c *gin.Context) {
283
283
284
284
cf , err := r .i .GetConfig (ctx , u , re )
285
285
if vo .IsConfigNotFoundError (err ) || vo .IsConfigParseError (err ) {
286
- r .log .Warn ("The config is invalid." , zap .Error (err ))
287
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The config is invalid." )
286
+ r .log .Warn ("The configuration is invalid." , zap .Error (err ))
287
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The configuration is invalid." )
288
288
return
289
289
} else if err != nil {
290
290
r .log .Error ("failed to get the configuration file." , zap .Error (err ))
@@ -293,8 +293,8 @@ func (r *Repo) RollbackDeployment(c *gin.Context) {
293
293
}
294
294
295
295
if ! cf .HasEnv (d .Env ) {
296
- r .log .Warn ("The env is not defined in the config ." , zap .Error (err ))
297
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The env is not defined in the config ." )
296
+ r .log .Warn ("The environment is not defined in the configuration ." , zap .Error (err ))
297
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The environment is not defined in the configuration ." )
298
298
return
299
299
}
300
300
@@ -305,8 +305,8 @@ func (r *Repo) RollbackDeployment(c *gin.Context) {
305
305
}
306
306
307
307
if locked , err := r .i .HasLockOfRepoForEnv (ctx , re , d .Env ); locked {
308
- r .log .Info ("The env is locked." , zap .String ("env" , d .Env ))
309
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The env is locked. You should unlock the env before deploying ." )
308
+ r .log .Info ("The environment is locked." , zap .String ("env" , d .Env ))
309
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "The environment is locked." )
310
310
return
311
311
} else if err != nil {
312
312
r .log .Error ("It has failed to check the lock." , zap .Error (err ))
@@ -337,7 +337,7 @@ func (r *Repo) RollbackDeployment(c *gin.Context) {
337
337
return
338
338
} else if vo .IsUnprocessibleDeploymentError (err ) {
339
339
r .log .Warn ("It is unprocessable entity." , zap .Error (err ))
340
- gb .ErrorResponse (c , http .StatusUnprocessableEntity , "It is unprocessable entity ." )
340
+ gb .ErrorResponse (c , http .StatusUnprocessableEntity , "There is a merge conflict or the commit's status checks failed ." )
341
341
return
342
342
} else if err != nil {
343
343
r .log .Error ("It has failed to rollback." , zap .Error (err ))
0 commit comments