Commit 741ced9
“yashdesai30”
fix(pullrequests): return warning instead of error on label addition failure in create_pull_request
- Add optional `Warning` field to `MinimalResponse` to allow propagating non-blocking warnings on successful operations.
- Update `create_pull_request` to return a successful tool response with a warning if PR creation succeeds but label addition fails, resolving the retry hazard.
- Correct unit tests to mock `422` (Unprocessable Entity) instead of `404` for label addition failure, and assert the warning field.
- Update description of the `labels` parameter in schema to clarify that labels must already exist in the repository.1 parent e3a96a4 commit 741ced9
4 files changed
Lines changed: 27 additions & 20 deletions
File tree
- pkg/github
- __toolsnaps__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| 696 | + | |
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
699 | 700 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 701 | + | |
705 | 702 | | |
706 | 703 | | |
707 | 704 | | |
| |||
710 | 707 | | |
711 | 708 | | |
712 | 709 | | |
713 | | - | |
714 | | - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
715 | 713 | | |
716 | 714 | | |
717 | 715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2207 | 2207 | | |
2208 | 2208 | | |
2209 | 2209 | | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
2216 | 2217 | | |
2217 | 2218 | | |
2218 | 2219 | | |
| |||
2295 | 2296 | | |
2296 | 2297 | | |
2297 | 2298 | | |
2298 | | - | |
| 2299 | + | |
2299 | 2300 | | |
2300 | 2301 | | |
2301 | 2302 | | |
| |||
2307 | 2308 | | |
2308 | 2309 | | |
2309 | 2310 | | |
2310 | | - | |
2311 | | - | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
2312 | 2314 | | |
2313 | 2315 | | |
2314 | 2316 | | |
| |||
2351 | 2353 | | |
2352 | 2354 | | |
2353 | 2355 | | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
2354 | 2362 | | |
2355 | 2363 | | |
2356 | 2364 | | |
| |||
0 commit comments