MCPcopy Index your code
hub / github.com/cli/cli / newPortsVisibilityCmd

Function newPortsVisibilityCmd

pkg/cmd/codespace/ports.go:219–231  ·  view source on GitHub ↗
(app *App, selector *CodespaceSelector)

Source from the content-addressed store, hash-verified

217}
218
219func newPortsVisibilityCmd(app *App, selector *CodespaceSelector) *cobra.Command {
220 return &cobra.Command{
221 Use: "visibility <port>:{public|private|org}...",
222 Short: "Change the visibility of the forwarded port",
223 Example: heredoc.Doc(`
224 $ gh codespace ports visibility 80:org 3000:private 8000:public
225 `),
226 Args: cobra.MinimumNArgs(1),
227 RunE: func(cmd *cobra.Command, args []string) error {
228 return app.UpdatePortVisibility(cmd.Context(), selector, args)
229 },
230 }
231}
232
233func (a *App) UpdatePortVisibility(ctx context.Context, selector *CodespaceSelector, args []string) (err error) {
234 ports, err := a.parsePortVisibilities(args)

Callers 1

newPortsCmdFunction · 0.85

Calls 1

UpdatePortVisibilityMethod · 0.65

Tested by

no test coverage detected