Commit 3f2058f
Refresh the refernce of the closed PR when reopening (go-gitea#24231)
Close go-gitea#24213
Replace go-gitea#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 4498a26 commit 3f2058f
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 | | |
| |||
2735 | 2736 | | |
2736 | 2737 | | |
2737 | 2738 | | |
2738 | | - | |
| 2739 | + | |
| 2740 | + | |
2739 | 2741 | | |
2740 | 2742 | | |
2741 | 2743 | | |
| |||
2745 | 2747 | | |
2746 | 2748 | | |
2747 | 2749 | | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
| 2765 | + | |
| 2766 | + | |
| 2767 | + | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
| 2771 | + | |
| 2772 | + | |
| 2773 | + | |
| 2774 | + | |
| 2775 | + | |
| 2776 | + | |
| 2777 | + | |
| 2778 | + | |
| 2779 | + | |
| 2780 | + | |
| 2781 | + | |
| 2782 | + | |
| 2783 | + | |
| 2784 | + | |
| 2785 | + | |
| 2786 | + | |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
2748 | 2801 | | |
2749 | 2802 | | |
2750 | 2803 | | |
| |||
2773 | 2826 | | |
2774 | 2827 | | |
2775 | 2828 | | |
| 2829 | + | |
2776 | 2830 | | |
2777 | 2831 | | |
2778 | 2832 | | |
| |||
| 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