Skip to content

Commit

Permalink
Merge pull request #1027 from CircleCI-Public/orbs/support-gh-apps-or…
Browse files Browse the repository at this point in the history
…ganizations

Enrich github prompt to capture organization ID for GitHub App integr…
  • Loading branch information
bjohnso5 authored Dec 14, 2023
2 parents 25c735c + bdf7d69 commit dd6a5b1
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 dd6a5b1

Please sign in to comment.