-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 cli command restore-repo: "units" should be parsed as StringSlice #19953
Merged
wxiaoguang
merged 7 commits into
go-gitea:main
from
wxiaoguang:fix-cli-restore-repo-units
Jun 15, 2022
Merged
Fix cli command restore-repo: "units" should be parsed as StringSlice #19953
wxiaoguang
merged 7 commits into
go-gitea:main
from
wxiaoguang:fix-cli-restore-repo-units
Jun 15, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wxiaoguang
force-pushed
the
fix-cli-restore-repo-units
branch
from
June 13, 2022 04:41
ea907ed
to
040100f
Compare
silverwind
approved these changes
Jun 14, 2022
GiteaBot
added
the
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
label
Jun 14, 2022
6543
reviewed
Jun 15, 2022
6543
approved these changes
Jun 15, 2022
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
Jun 15, 2022
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Jun 16, 2022
* giteaofficial/main: Allow render HTML with css/js external links (go-gitea#19017) Use correct count for `NumOpenIssues` (go-gitea#19980) In code search, get code unit accessible repos in one (main) query (go-gitea#19764) [skip ci] Updated translations via Crowdin Always try to fetch repo for mirrors (go-gitea#19975) Remove tab/TabName usage where it's not needed (go-gitea#19973) Fix cli command restore-repo: "units" should be parsed as StringSlice (go-gitea#19953) Uppercase first languages letters (go-gitea#19965) Move tests as seperate sub packages to reduce duplicated file names (go-gitea#19951) Replace unstyled meter with progress (go-gitea#19968) [skip ci] Updated translations via Crowdin [skip ci] Updated translations via Crowdin Remove singuliere from MAINTAINERS (go-gitea#19883) Fix aria for logo (go-gitea#19955) Fix mirror template bug (go-gitea#19959)
Sorry for bothering but I think what I have done in this PR is not correct. Details and the fix: |
vsysoev
pushed a commit
to IntegraSDL/gitea
that referenced
this pull request
Aug 10, 2022
…go-gitea#19953) * Fix cli command restore-repo: "units" should be parsed as StringSlice because after go-gitea#15790 it's read by c.StringSlice("units"). Before, the "units" were processed by strings.Split * Add checking for invalid unit names Co-authored-by: 6543 <6543@obermui.de>
AbdulrhmnGhanem
pushed a commit
to kitspace/gitea
that referenced
this pull request
Aug 24, 2022
…go-gitea#19953) * Fix cli command restore-repo: "units" should be parsed as StringSlice because after go-gitea#15790 it's read by c.StringSlice("units"). Before, the "units" were processed by strings.Split * Add checking for invalid unit names Co-authored-by: 6543 <6543@obermui.de>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Line 64:
c.StringSlice("units"),
so the definition of "units" should beStringSliceFlag
, andStringSliceFlag
only supports to parse comma separated values from ENV or DefValue.Background: this bug was introduced by #15790 , before, the
units
were processed bystrings.Split
, so nowStringSliceFlag
should be used if we do not want to split the value manually. Or, we can keep the old comma-separated-string behavior, continue to usestrings.Split
if most people prefer that, I am fine to either.