The output when gh stack submit creates a new PR looks like this:
=== Phase 3: PRs ===
✓ Created PR #1234 for boneskull/derp (https://github.com/boneskull/derp/pull/1234)
This should instead use the Hyperlink function:
|
func (s *Style) Hyperlink(text, url string) string { |
|
if !s.enabled || !s.isTTY || url == "" { |
|
if url == "" { |
|
return text |
|
} |
|
return fmt.Sprintf("%s (%s)", text, url) |
|
} |
|
// OSC 8 hyperlink: ESC]8;;URLESC\TEXTESC]8;;ESC\ |
|
return fmt.Sprintf("\x1b]8;;%s\x1b\\%s\x1b]8;;\x1b\\", url, text) |
|
} |
gh stack submit uses this function when emitting a notice about updating a PR; see:
|
fmt.Printf("Updating %s for %s (base: %s)... ", s.Hyperlink(fmt.Sprintf("PR #%d", d.prNum), ghClient.PRURL(d.prNum)), s.Branch(b.Name), s.Branch(parent)) |
The output when
gh stack submitcreates a new PR looks like this:This should instead use the
Hyperlinkfunction:gh-stack/internal/style/style.go
Lines 208 to 217 in f157268
gh stack submituses this function when emitting a notice about updating a PR; see:gh-stack/cmd/submit.go
Line 474 in f157268