Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/codespaces/portforwarder/port_forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ func (fwd *CodespacesPortForwarder) UpdatePortVisibility(ctx context.Context, re
}

// Delete the existing tunnel port to update
err = fwd.connection.TunnelManager.DeleteTunnelPort(ctx, fwd.connection.Tunnel, uint16(remotePort), fwd.connection.Options)
port, err := convertIntToUint16(remotePort)
if err != nil {
return fmt.Errorf("error converting port: %w", err)
}
err = fwd.connection.TunnelManager.DeleteTunnelPort(ctx, fwd.connection.Tunnel, port, fwd.connection.Options)
if err != nil {
return fmt.Errorf("error deleting tunnel port: %w", err)
}
Expand Down
16 changes: 15 additions & 1 deletion pkg/cmd/issue/close/close.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"net/http"
"time"

"github.com/MakeNowJust/heredoc"
"github.com/cli/cli/v2/api"
fd "github.com/cli/cli/v2/internal/featuredetection"
"github.com/cli/cli/v2/internal/ghrepo"
Expand Down Expand Up @@ -38,7 +39,20 @@ func NewCmdClose(f *cmdutil.Factory, runF func(*CloseOptions) error) *cobra.Comm
cmd := &cobra.Command{
Use: "close {<number> | <url>}",
Short: "Close issue",
Args: cobra.ExactArgs(1),
Example: heredoc.Doc(`
# Close issue
$ gh issue close 123

# Close issue and add a closing comment
$ gh issue close 123 --comment "Closing this issue"

# Close issue as a duplicate of issue #456
$ gh issue close 123 --duplicate-of 456

# Close issue as not planned
$ gh issue close 123 --reason "not planned"
`),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
issueNumber, baseRepo, err := shared.ParseIssueFromArg(args[0])
if err != nil {
Expand Down
Loading