-
Notifications
You must be signed in to change notification settings - Fork 364
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:failed to edit repo #1281
fix:failed to edit repo #1281
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1281 +/- ##
==========================================
+ Coverage 74.79% 74.81% +0.02%
==========================================
Files 144 144
Lines 16256 16248 -8
==========================================
- Hits 12158 12156 -2
+ Misses 3156 3152 -4
+ Partials 942 940 -2 ☔ View full report in Codecov by Sentry. |
1d64a3a
to
e33e2e9
Compare
e33e2e9
to
457e234
Compare
return when the repo cant be found and err !=nil
457e234
to
094d358
Compare
if err == nil { | ||
// already exists | ||
if err != nil { | ||
// repo does not exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some description to the PR is needed. What is the intention here?
Why do we raise error if *b.Name
doesn't exist? If we want to handle cloning(?) of the repo from :name
to *b.Name
the second one should not exist imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw similar doubt has been expressed by @randombenj in the original PR #1093 (comment)
I suggest to close both PRs without merging if this comment is not addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to me, this looks like as follows:
- edit repo "A" and set name to "B"
- if no repo "A" exists, abort (line 111)
- if new name is set (line 116)
- check if repo with new "B" name already exists (line 117)
- if yes (line 118: if err == nil), abort, because we cannot rename to an existing repo
therefore, the patch makes no sense, it incorrectly aborts when getting the repo "B" does return an error (err != nil) and the "repo does not exist.
I agree to drop the PR.
return when the repo cant be found and err !=nil
Replaces #1093
Requirements
All new code should be covered with tests, documentation should be updated. CI should pass.
Description of the Change
Checklist
AUTHORS