Skip to content

Commit dd6a5b1

Browse files
author
Bryan Johnson
authored
Merge pull request #1027 from CircleCI-Public/orbs/support-gh-apps-organizations
Enrich github prompt to capture organization ID for GitHub App integr…
2 parents 25c735c + bdf7d69 commit dd6a5b1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

cmd/orb.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import (
1717
"strings"
1818
"time"
1919

20+
"github.com/fatih/color"
21+
"github.com/pkg/errors"
22+
"github.com/spf13/cobra"
23+
"golang.org/x/exp/slices"
24+
"gopkg.in/yaml.v3"
25+
2026
"github.com/CircleCI-Public/circleci-cli/api"
2127
"github.com/CircleCI-Public/circleci-cli/api/collaborators"
2228
"github.com/CircleCI-Public/circleci-cli/api/graphql"
@@ -28,11 +34,6 @@ import (
2834
"github.com/CircleCI-Public/circleci-cli/settings"
2935
"github.com/CircleCI-Public/circleci-cli/telemetry"
3036
"github.com/CircleCI-Public/circleci-cli/version"
31-
"github.com/fatih/color"
32-
"github.com/pkg/errors"
33-
"github.com/spf13/cobra"
34-
"golang.org/x/exp/slices"
35-
"gopkg.in/yaml.v3"
3637

3738
"github.com/AlecAivazis/survey/v2"
3839
"github.com/go-git/go-git/v5"
@@ -1301,6 +1302,12 @@ func initOrb(opts orbOptions) error {
13011302
Message: fmt.Sprintf("Enter your %s username or organization", vcsProvider),
13021303
Default: opts.cfg.OrbPublishing.DefaultOwner,
13031304
}
1305+
if vcsProvider == "GitHub" {
1306+
iprompt = &survey.Input{
1307+
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.",
1308+
"https://circleci.com/docs/github-apps-integration/"),
1309+
}
1310+
}
13041311
err = survey.AskOne(iprompt, &ownerName)
13051312
if err != nil {
13061313
return err

0 commit comments

Comments
 (0)