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

Avoid losing token when updating mirror settings (#30429) #30464

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

GiteaBot
Copy link
Contributor

Backport #30429 by @wolfogre

Fix #30416.

Before (it shows as "Unset" while there's a token):

image

After:

image

The username shows as "oauth2" because of

u.User = url.UserPassword("oauth2", g.opts.AuthToken)

I have checked that all usage of MirrorRemoteAddress has been updated.

image

However, it needs to be checked again when backporting.

Fix go-gitea#30416.

Before (it shows as "Unset" while there's a token):

<img width="980" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/d7148e3e-62c9-4d2e-942d-3d795b79515a">

After:

<img width="977" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/24aaa1db-5baa-4204-9081-470b15ea72b5">

The username shows as "oauth2" because of
https://github.com/go-gitea/gitea/blob/f9fdac9809335729b2ac3227b2a5f71a62fc64ad/services/migrations/dump.go#L99

I have checked that all usage of `MirrorRemoteAddress` has been updated.

<img width="1806" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/2f042501-2824-4511-9203-c84a6731a02d">

However, it needs to be checked again when backporting.

---------

Co-authored-by: Giteabot <teabot@gitea.io>
@GiteaBot GiteaBot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them type/bug labels Apr 13, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 13, 2024
@GiteaBot GiteaBot added this to the 1.22.0 milestone Apr 13, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 13, 2024
@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 Apr 13, 2024
@silverwind silverwind enabled auto-merge (squash) April 13, 2024 15:42
@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 Apr 13, 2024
@silverwind silverwind merged commit 92f4cd9 into go-gitea:release/v1.22 Apr 13, 2024
26 checks passed
@wolfogre
Copy link
Member

However, it needs to be checked again when backporting.

I checked it and ensured that all usage of MirrorRemoteAddress has been updated.

image

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 14, 2024
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. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/M Denotes a PR that changes 30-99 lines, ignoring generated files. topic/repo-migration Migrate repos from other platforms to Gitea, or from Gitea to them type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants