Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrich github prompt to capture organization ID for GitHub App integr… #1026

Merged
merged 1 commit into from
Dec 14, 2023
Merged
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
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