Commit e962ade
authored
Refresh the refernce of the closed PR when reopening (#24231)
Close #24213
Replace #23830
#### Cause
- Before, in order to making PR can get latest commit after reopening,
the `ref`(${REPO_PATH}/refs/pull/${PR_INDEX}/head) of evrey closed PR
will be updated when pushing commits to the `head branch` of the closed
PR.
#### Changes
- For closed PR , won't perform these behavior: insert`comment`, push
`notification` (UI and email), exectue
[pushToBaseRepo](https://github.com/go-gitea/gitea/blob/74225033413dc0f2b308bbe069f6d185b551e364/services/pull/pull.go#L409)
function and trigger `action` any more when pushing to the `head branch`
of the closed PR.
- Refresh the reference of the PR when reopening the closed PR (**even
if the head branch has been deleted before**). Make the reference of PR
consistent with the `head branch`.1 parent 80765aa commit e962ade
File tree
5 files changed
+68
-21
lines changed- models/issues
- routers/web/repo
- services/pull
5 files changed
+68
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
436 | 440 | | |
437 | 441 | | |
438 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 58 | + | |
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
| |||
74 | 69 | | |
75 | 70 | | |
76 | 71 | | |
77 | | - | |
| 72 | + | |
78 | 73 | | |
79 | 74 | | |
80 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
2784 | 2785 | | |
2785 | 2786 | | |
2786 | 2787 | | |
2787 | | - | |
| 2788 | + | |
| 2789 | + | |
2788 | 2790 | | |
2789 | 2791 | | |
2790 | 2792 | | |
| |||
2794 | 2796 | | |
2795 | 2797 | | |
2796 | 2798 | | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
2797 | 2850 | | |
2798 | 2851 | | |
2799 | 2852 | | |
| |||
2822 | 2875 | | |
2823 | 2876 | | |
2824 | 2877 | | |
| 2878 | + | |
2825 | 2879 | | |
2826 | 2880 | | |
2827 | 2881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
| 261 | + | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| |||
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | 278 | | |
281 | 279 | | |
282 | | - | |
| 280 | + | |
283 | 281 | | |
284 | 282 | | |
285 | 283 | | |
| |||
294 | 292 | | |
295 | 293 | | |
296 | 294 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | 295 | | |
302 | 296 | | |
303 | 297 | | |
| |||
503 | 497 | | |
504 | 498 | | |
505 | 499 | | |
506 | | - | |
| 500 | + | |
507 | 501 | | |
508 | 502 | | |
509 | 503 | | |
| |||
539 | 533 | | |
540 | 534 | | |
541 | 535 | | |
542 | | - | |
| 536 | + | |
543 | 537 | | |
544 | 538 | | |
545 | 539 | | |
| |||
0 commit comments