Skip to content

Make git clone URL could use current signed-in user#33091

Merged
lunny merged 11 commits into
go-gitea:mainfrom
wxiaoguang:fix-ssh-user
Jan 7, 2025
Merged

Make git clone URL could use current signed-in user#33091
lunny merged 11 commits into
go-gitea:mainfrom
wxiaoguang:fix-ssh-user

Conversation

@wxiaoguang
Copy link
Copy Markdown
Contributor

@wxiaoguang wxiaoguang commented Jan 3, 2025

close #33086

  • Add a special value for "SSH_USER" setting: (DOER_USERNAME)
  • Improve parseRepositoryURL and add tests (now it doesn't have hard dependency on some setting values)

Many changes are just adding "ctx" and "doer" argument to functions.

By the way, improve app.example.ini, remove all %(key)s syntax, it only makes messy and no user really cares about it.

Document: https://gitea.com/gitea/docs/pulls/138

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 3, 2025
@github-actions github-actions Bot added modifies/go docs-update-needed The document needs to be updated synchronously labels Jan 3, 2025
@wxiaoguang wxiaoguang changed the title fix Make git clone URL could use current signed-in user Jan 3, 2025
@wxiaoguang wxiaoguang force-pushed the fix-ssh-user branch 3 times, most recently from 4cd7d59 to 85782b3 Compare January 3, 2025 04:14
@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Jan 3, 2025
@wxiaoguang wxiaoguang added the type/enhancement An improvement of existing functionality label Jan 3, 2025
@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 Jan 4, 2025
@wxiaoguang wxiaoguang requested a review from Zettat123 January 6, 2025 04:14
@wxiaoguang wxiaoguang requested a review from bohde January 7, 2025 00:35
Comment thread models/repo/repo.go Outdated
@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 Jan 7, 2025
Comment thread custom/conf/app.example.ini Outdated
Comment thread custom/conf/app.example.ini Outdated
Comment thread custom/conf/app.example.ini Outdated
Comment thread custom/conf/app.example.ini Outdated
Comment thread custom/conf/app.example.ini Outdated
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 7, 2025
@lunny lunny merged commit 34dfc25 into go-gitea:main Jan 7, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 7, 2025
@wxiaoguang wxiaoguang deleted the fix-ssh-user branch January 7, 2025 05:42
@prologic
Copy link
Copy Markdown

prologic commented Jan 7, 2025

Very nice! 👌 Thank you so much 🙏

zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 8, 2025
* giteaofficial/main:
  add submodule diff links (go-gitea#33097)
  [skip ci] Updated translations via Crowdin
  Update status check for all supported on.pull_request.types in Gitea (go-gitea#33117)
  Support the new exit code for `git remote` subcommands for git version >=2.30.0 (go-gitea#33129)
  Make git clone URL could use current signed-in user (go-gitea#33091)
  Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (go-gitea#33106)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

docs-update-needed The document needs to be updated synchronously lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change displayed SSH_USER to logged in user

5 participants