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

Add error info if no user can fork the repo #25820

Merged

Conversation

yp05327
Copy link
Contributor

@yp05327 yp05327 commented Jul 11, 2023

Before: (Owner list is empty)
image

After: (Disable the button and show the error info)
image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 11, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 11, 2023
@silverwind
Copy link
Member

silverwind commented Jul 11, 2023

"This repository can not be forked" would sound better.

Can we also give some hint on the reason why it can not be done?

yp05327 and others added 3 commits July 12, 2023 10:14
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
@yp05327
Copy link
Contributor Author

yp05327 commented Jul 12, 2023

Can we also give some hint on the reason why it can not be done?

@silverwind
Updated the error info, does it look good to you?

@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 Jul 12, 2023
@silverwind
Copy link
Member

silverwind commented Jul 12, 2023

Looks good, but could also be made a single translation string I guess as I'm not sure whether <text>: <text> constructs are the same in all languages. If we combine it, use This repository can not be forked because there are no valid owners..

@yp05327
Copy link
Contributor Author

yp05327 commented Jul 13, 2023

Looks good, but could also be made a single translation string I guess as I'm not sure whether <text>: <text> constructs are the same in all languages. If we combine it, use This repository can not be forked because there are no valid owners..

Updated. 😄

@silverwind
Copy link
Member

Thanks, this is definitely the best option to go about such translations 😉.

@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 Jul 14, 2023
@lunny lunny added topic/ui-interaction Change the process how users use Gitea instead of the visual appearance reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Jul 14, 2023
@lunny lunny merged commit 52f4691 into go-gitea:main Jul 14, 2023
23 checks passed
@GiteaBot GiteaBot added this to the 1.21.0 milestone Jul 14, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 14, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 14, 2023
* giteaofficial/main:
  Fix incorrect release count (go-gitea#25879)
  Add Github related extensions in devcontainer (go-gitea#25800)
  Add error info if no user can fork the repo (go-gitea#25820)
  Fix wrong usage of PathEscapeSegments in branch list page (go-gitea#25864)
  fix incorrect repo url when changed the case of ownername (go-gitea#25733)
  Upgrade go dependencies (go-gitea#25819)
  Don't stack PR tab menu on small screens (go-gitea#25789)
  Link to list of vulnerabilities (go-gitea#25872)
  [skip ci] Updated translations via Crowdin
  move issue filters to shared template (go-gitea#25729)
  [skip ci] Updated translations via Crowdin
  Remove `git.FileBlame` (go-gitea#25841)
  Fix empty project displayed in issue sidebar (go-gitea#25802)
  Update blog links (go-gitea#25843)
  Fix margin on the `new/edit milestone` page (go-gitea#25801)
  Do not "guess" the file encoding/BOM when using API to upload files (go-gitea#25828)
Comment on lines +179 to +180
ctx.Data["Flash"] = ctx.Flash
ctx.Flash.Error(msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would break the "Flash" framework, it should be ctx.Flash.Error(msg, true)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> Fix "Flash" message usage #25895

@yp05327 yp05327 deleted the add-error-info-when-no-user-can-fork-repo branch July 20, 2023 01:48
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 13, 2023
@denyskon denyskon added the type/enhancement An improvement of existing functionality label Nov 13, 2023
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. topic/ui-interaction Change the process how users use Gitea instead of the visual appearance type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants