Skip to content

Commit

Permalink
Enrich github prompt to capture organization ID for GitHub App integr…
Browse files Browse the repository at this point in the history
…ation users
  • Loading branch information
bjohnso5 committed Dec 14, 2023
1 parent 6e8c45b commit caf170b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ import (
"strings"
"time"

"github.com/fatih/color"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/exp/slices"
"gopkg.in/yaml.v3"

"github.com/CircleCI-Public/circleci-cli/api"
"github.com/CircleCI-Public/circleci-cli/api/collaborators"
"github.com/CircleCI-Public/circleci-cli/api/graphql"
Expand All @@ -28,11 +34,6 @@ import (
"github.com/CircleCI-Public/circleci-cli/settings"
"github.com/CircleCI-Public/circleci-cli/telemetry"
"github.com/CircleCI-Public/circleci-cli/version"
"github.com/fatih/color"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"golang.org/x/exp/slices"
"gopkg.in/yaml.v3"

"github.com/AlecAivazis/survey/v2"
"github.com/go-git/go-git/v5"
Expand Down Expand Up @@ -1301,6 +1302,12 @@ func initOrb(opts orbOptions) error {
Message: fmt.Sprintf("Enter your %s username or organization", vcsProvider),
Default: opts.cfg.OrbPublishing.DefaultOwner,
}
if vcsProvider == "GitHub" {
iprompt = &survey.Input{
Message: fmt.Sprintf("If your organization is using CircleCI’s GitHub App integration (see %s to check), enter your organization ID found in Organization Settings. If not, enter your organization name as a string.",
"https://circleci.com/docs/github-apps-integration/"),
}
}
err = survey.AskOne(iprompt, &ownerName)
if err != nil {
return err
Expand Down

0 comments on commit caf170b

Please sign in to comment.