Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh the refernce of the closed PR when reopening (#24231) #24587

Merged
merged 1 commit into from
May 8, 2023

Conversation

GiteaBot
Copy link
Contributor

@GiteaBot GiteaBot commented May 8, 2023

Backport #24231 by @sillyguodong

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: insertcomment, push notification (UI and email), exectue pushToBaseRepo 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.

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`.
@GiteaBot GiteaBot added this to the 1.19.4 milestone May 8, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 8, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 8, 2023
@GiteaBot GiteaBot requested review from lunny and wolfogre May 8, 2023 07:11
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 8, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 8, 2023
@silverwind silverwind merged commit 306b7b5 into go-gitea:release/v1.19 May 8, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 6, 2023
@techknowlogick techknowlogick deleted the backport-24231-v1.19 branch September 9, 2023 05:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants