Commit 239f25f
fix: Improve GitLab commit status handling
This commit addresses confusion around when GitLab comments are posted
versus when commit status updates are used.
Changes:
* Documentation: Added clear explanation that comments are only posted
when commit status updates fail, with visual example showing GitLab
Pipelines tab where status appears when successful
* Code clarity: Refactored commit status logic with better error
handling and detailed logging when both source/target project status
updates fail
* Test reliability: Enhanced GitLab MR test to properly verify pipeline
status success and ensure no comments are posted when status updates work
* Test accuracy: Removed redundant CreateStatus test cases and improved
SHA tracking for more reliable test execution
The key fix is clarifying that Pipelines-as-Code tries to set commit status
on both source (fork) and target (upstream) projects, and only falls back
to posting comments when both attempts fail due to permission issues.
Fixes the misleading documentation that didn't properly explain the
relationship between GitLab API permissions, commit status updates, and
comment posting behavior.
Jira: https://issues.redhat.com/browse/SRVKP-8908
Signed-off-by: Chmouel Boudjnah <[email protected]>1 parent 542f1a0 commit 239f25f
File tree
6 files changed
+211
-73
lines changed- docs
- content/docs/guide
- static/images
- pkg/provider/gitlab
- test
- pkg/scm
6 files changed
+211
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
126 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
127 | 150 | | |
128 | 151 | | |
129 | 152 | | |
| |||
132 | 155 | | |
133 | 156 | | |
134 | 157 | | |
135 | | - | |
136 | | - | |
137 | 158 | | |
138 | 159 | | |
139 | 160 | | |
| |||
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
293 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
294 | 304 | | |
295 | 305 | | |
296 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
204 | 264 | | |
205 | 265 | | |
206 | 266 | | |
| |||
216 | 276 | | |
217 | 277 | | |
218 | 278 | | |
| 279 | + | |
219 | 280 | | |
220 | 281 | | |
221 | 282 | | |
| |||
232 | 293 | | |
233 | 294 | | |
234 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
235 | 330 | | |
236 | 331 | | |
237 | 332 | | |
| |||
1044 | 1139 | | |
1045 | 1140 | | |
1046 | 1141 | | |
| 1142 | + | |
| 1143 | + | |
1047 | 1144 | | |
1048 | 1145 | | |
1049 | 1146 | | |
| 1147 | + | |
1050 | 1148 | | |
1051 | 1149 | | |
1052 | 1150 | | |
| |||
0 commit comments