mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-28 04:10:44 -04:00
* always fetch HEAD repo with it's clone URL * use the number instead of ID when generating the summary table Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
This commit is contained in:
parent
db994695e0
commit
27fa51c7a8
1 changed files with 3 additions and 3 deletions
|
|
@ -155,7 +155,7 @@ func (r *CopyPullRequestReq) Run(
|
|||
Track: []string{prBranch},
|
||||
Fetch: true,
|
||||
Name: r.FromOrigin,
|
||||
URL: fmt.Sprintf("https://github.com/%s/%s.git", r.FromOwner, r.FromRepo),
|
||||
URL: res.OriginPullRequest.GetHead().GetRepo().GetCloneURL(),
|
||||
})
|
||||
if err != nil {
|
||||
err = fmt.Errorf("fetching target branch base ref: %s, %w", remoteRes.String(), err)
|
||||
|
|
@ -400,11 +400,11 @@ func (r *CopyPullRequestRes) ToTable(err error) table.Writer {
|
|||
if r.Request != nil {
|
||||
from := r.Request.FromOwner + "/" + r.Request.FromRepo
|
||||
if pr := r.OriginPullRequest; pr != nil {
|
||||
from = fmt.Sprintf("[%s#%d](%s)", from, pr.GetID(), pr.GetHTMLURL())
|
||||
from = fmt.Sprintf("[%s#%d](%s)", from, pr.GetNumber(), pr.GetHTMLURL())
|
||||
}
|
||||
to := r.Request.ToOwner + "/" + r.Request.ToRepo
|
||||
if pr := r.PullRequest; pr != nil {
|
||||
to = fmt.Sprintf("[%s#%d](%s)", to, pr.GetID(), pr.GetHTMLURL())
|
||||
to = fmt.Sprintf("[%s#%d](%s)", to, pr.GetNumber(), pr.GetHTMLURL())
|
||||
}
|
||||
row = table.Row{from, to}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue