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

Fix being unable to use a repo that prohibits accepting PRs as a PR source. #26785

Conversation

CaiCandong
Copy link
Member

@CaiCandong CaiCandong commented Aug 29, 2023

Description

Sometimes, we need to use an upstream mirror repository to update the current development repository, but mirror repositories are prohibited from PR. It should not appear in merge to, but it can appear in pull from.
Fix #24585
Fix #26193
Fix #26781
Related #24183

Many thanks to @apnote for assisting me in reproducing this bug!

ScreenShot


Before

After

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 29, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 29, 2023
@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 Aug 29, 2023
@CaiCandong CaiCandong force-pushed the bugfix/Fix-being-upstream-branch-missing-in-pr-sources branch from b196038 to 5a380fa Compare August 29, 2023 08:07
@CaiCandong CaiCandong added outdated/backport/v1.19 This PR should be backported to Gitea 1.19 backport/v1.20 This PR should be backported to Gitea 1.20 labels Aug 29, 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 Aug 29, 2023
@lafriks lafriks merged commit c576b50 into go-gitea:main Aug 29, 2023
24 checks passed
@GiteaBot GiteaBot added this to the 1.21.0 milestone Aug 29, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Aug 29, 2023
…ource. (go-gitea#26785)

## Description 
Sometimes, we need to use an upstream mirror repository to update the
current development repository, but mirror repositories are prohibited
from PR. It should not appear in `merge to,` but it can appear in `pull
from.`
Fix go-gitea#24585 go-gitea#26193 go-gitea#26781
Related go-gitea#24183

Many thanks to @apnote  for assisting me in reproducing this bug!

## ScreenShot
---
### Before

<img
src="https://github.com/go-gitea/gitea/assets/50507092/3d76c376-1f54-45b9-80c9-6ba8319d6a9a"
width="400px">

<img
src="https://github.com/go-gitea/gitea/assets/50507092/fbfd9f7f-421f-4a2e-9a3e-f2958bbf3312"
width="400px">

### After

<img
src="https://github.com/go-gitea/gitea/assets/50507092/e6984524-4f61-4310-b795-4d8598bd8963"
width="400px">

<img
src="https://github.com/go-gitea/gitea/assets/50507092/04065b44-78d7-4721-bf31-0f1674150727"
width="400px">
lunny pushed a commit that referenced this pull request Aug 29, 2023
…ource. (#26785) (#26790)

Backport #26785 by @CaiCandong

## Description 
Sometimes, we need to use an upstream mirror repository to update the
current development repository, but mirror repositories are prohibited
from PR. It should not appear in `merge to,` but it can appear in `pull
from.`
Fix #24585 #26193 #26781
Related #24183

Many thanks to @apnote  for assisting me in reproducing this bug!

## ScreenShot
---
### Before

<img
src="https://github.com/go-gitea/gitea/assets/50507092/3d76c376-1f54-45b9-80c9-6ba8319d6a9a"
width="400px">

<img
src="https://github.com/go-gitea/gitea/assets/50507092/fbfd9f7f-421f-4a2e-9a3e-f2958bbf3312"
width="400px">

### After

<img
src="https://github.com/go-gitea/gitea/assets/50507092/e6984524-4f61-4310-b795-4d8598bd8963"
width="400px">

<img
src="https://github.com/go-gitea/gitea/assets/50507092/04065b44-78d7-4721-bf31-0f1674150727"
width="400px">

Co-authored-by: CaiCandong <50507092+CaiCandong@users.noreply.github.com>
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.20. @CaiCandong, please send one manually. 🍵

go run ./contrib/backport 26785
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Aug 29, 2023
@CaiCandong
Copy link
Member Author

I was unable to create a backport for 1.20. @CaiCandong, please send one manually. 🍵

Shouldn't do anything.

zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 30, 2023
* giteaofficial/main:
  Use `Set[Type]` instead of `map[Type]bool/struct{}`. (go-gitea#26804)
  Fix verifyCommits error when push a new branch (go-gitea#26664)
  Fix Uint8Array comparisons and update vitest (go-gitea#26805)
  Add various missing files-changed dependencies (go-gitea#26799)
  Improve flex list item padding (go-gitea#26779)
  Include the GITHUB_TOKEN/GITEA_TOKEN secret for fork pull requests (go-gitea#26759)
  feat(API): add route and implementation for creating/updating repository secret (go-gitea#26766)
  Replace deprecated `elliptic.Marshal` (go-gitea#26800)
  Updating the js libraries to latest version. (go-gitea#26795)
  Fix some slice append usages (go-gitea#26778)
  Use Go 1.21 for golangci-lint (go-gitea#26786)
  Fix notification circle (border-radius) (go-gitea#26794)
  Fix context filter has no effect in dashboard (go-gitea#26695)
  Add default label in branch select list (go-gitea#26697)
  Remove redundant nil check in `WalkGitLog` (go-gitea#26773)
  Remove fomantic `item` module (go-gitea#26775)
  Update info regarding internet connection for build (go-gitea#26776)
  Fix being unable to use a repo that prohibits accepting PRs as a PR source. (go-gitea#26785)
@CaiCandong CaiCandong deleted the bugfix/Fix-being-upstream-branch-missing-in-pr-sources branch September 4, 2023 12:41
nrdufour added a commit to nrdufour/home-ops that referenced this pull request Sep 8, 2023
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker.io/gitea/gitea](https://github.com/go-gitea/gitea) | patch | `1.20.3` -> `1.20.4` |

---

### Release Notes

<details>
<summary>go-gitea/gitea (docker.io/gitea/gitea)</summary>

### [`v1.20.4`](https://github.com/go-gitea/gitea/blob/HEAD/CHANGELOG.md#1204---2023-09-08)

[Compare Source](go-gitea/gitea@v1.20.3...v1.20.4)

-   SECURITY
    -   Check blocklist for emails when adding them to account ([#&#8203;26812](go-gitea/gitea#26812)) ([#&#8203;26831](go-gitea/gitea#26831))
-   ENHANCEMENTS
    -   Add `branch_filter` to hooks API endpoints ([#&#8203;26599](go-gitea/gitea#26599)) ([#&#8203;26632](go-gitea/gitea#26632))
    -   Fix incorrect "tabindex" attributes ([#&#8203;26733](go-gitea/gitea#26733)) ([#&#8203;26734](go-gitea/gitea#26734))
    -   Use line-height: normal by default ([#&#8203;26635](go-gitea/gitea#26635)) ([#&#8203;26708](go-gitea/gitea#26708))
    -   Fix unable to display individual-level project ([#&#8203;26198](go-gitea/gitea#26198)) ([#&#8203;26636](go-gitea/gitea#26636))
-   BUGFIXES
    -   Fix wrong review requested number ([#&#8203;26784](go-gitea/gitea#26784)) ([#&#8203;26880](go-gitea/gitea#26880))
    -   Avoid double-unescaping of form value ([#&#8203;26853](go-gitea/gitea#26853)) ([#&#8203;26863](go-gitea/gitea#26863))
    -   Redirect from `{repo}/issues/new` to `{repo}/issues/new/choose` when blank issues are disabled ([#&#8203;26813](go-gitea/gitea#26813)) ([#&#8203;26847](go-gitea/gitea#26847))
    -   Sync tags when adopting repos ([#&#8203;26816](go-gitea/gitea#26816)) ([#&#8203;26834](go-gitea/gitea#26834))
    -   Fix verifyCommits error when push a new branch ([#&#8203;26664](go-gitea/gitea#26664)) ([#&#8203;26810](go-gitea/gitea#26810))
    -   Include the GITHUB_TOKEN/GITEA_TOKEN secret for fork pull requests ([#&#8203;26759](go-gitea/gitea#26759)) ([#&#8203;26806](go-gitea/gitea#26806))
    -   Fix some slice append usages ([#&#8203;26778](go-gitea/gitea#26778)) ([#&#8203;26798](go-gitea/gitea#26798))
    -   Add fix incorrect can_create_org_repo for org owner team ([#&#8203;26683](go-gitea/gitea#26683)) ([#&#8203;26791](go-gitea/gitea#26791))
    -   Fix bug for ctx usage ([#&#8203;26763](go-gitea/gitea#26763))
    -   Make issue template field template access correct template data ([#&#8203;26698](go-gitea/gitea#26698)) ([#&#8203;26709](go-gitea/gitea#26709))
    -   Use correct minio error ([#&#8203;26634](go-gitea/gitea#26634)) ([#&#8203;26639](go-gitea/gitea#26639))
    -   Ignore the trailing slashes when comparing oauth2 redirect_uri ([#&#8203;26597](go-gitea/gitea#26597)) ([#&#8203;26618](go-gitea/gitea#26618))
    -   Set errwriter for urfave/cli v1 ([#&#8203;26616](go-gitea/gitea#26616))
    -   Fix reopen logic for agit flow pull request ([#&#8203;26399](go-gitea/gitea#26399)) ([#&#8203;26613](go-gitea/gitea#26613))
    -   Fix context filter has no effect in dashboard ([#&#8203;26695](go-gitea/gitea#26695)) ([#&#8203;26811](go-gitea/gitea#26811))
    -   Fix being unable to use a repo that prohibits accepting PRs as a PR source. ([#&#8203;26785](go-gitea/gitea#26785)) ([#&#8203;26790](go-gitea/gitea#26790))
    -   Fix Page Not Found error ([#&#8203;26768](go-gitea/gitea#26768))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yMy4yIiwidXBkYXRlZEluVmVyIjoiMzYuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Reviewed-on: https://git.home/nrdufour/home-ops/pulls/79
Co-authored-by: Renovate <renovate@ptinem.io>
Co-committed-by: Renovate <renovate@ptinem.io>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/manual No power to the bots! Create your backport yourself! backport/v1.20 This PR should be backported to Gitea 1.20 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
4 participants