-
-
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
Change pull description text (#2075) #2646
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2646 +/- ##
=======================================
Coverage 27.12% 27.12%
=======================================
Files 86 86
Lines 17064 17064
=======================================
Hits 4629 4629
Misses 11757 11757
Partials 678 678 Continue to review full report at Codecov.
|
|
||
var err error | ||
if err = pull.GetHeadRepo(); err != nil { |
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.
If PR is made and than forked repository is deleted there will be error ErrRepoNotExist
and it will not be possible to open PR even to close it. It should at least fall back to message ... from fork_owner:branch into branch
format in such case.
Currently in such case this codes gets PANIC: runtime error: invalid memory address or nil pointer dereference
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.
Probably I could be wrong that it returns error.., More looks like it just sets pull.HeadRepo
as nil
Also if |
Thank you for your review. I made some change:
|
} else { | ||
ctx.Data["HeadTarget"] = pull.HeadUserName + "/" + pull.HeadRepo.Name + ":" + pull.HeadBranch | ||
} | ||
ctx.Data["BaseTarget"] = pull.BaseBranch |
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.
Since lines 192-199 seem to be duplicated in PrepareViewPullInfo(..)
, maybe we should move them to a helper function?
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.
That would best option
LGTM |
LGTM |
Change description text on pull request page
from
... from fork_owner/branch into base_owner/branch
styleto
... from fork_owner/repo:branch into branch
styleit was suggested on #2075
Closes #2075