You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add command to generate a GitHub app installation access token
Disable the branch-protection command. We don't use it anymore and it's
now dangerous to use because it would override our manualy brancht
protection configuration.
Short: "Create an access token for an installed GitHub App",
27
+
Run: githubAppAccessTokenGenerateCommand,
28
+
}
29
+
32
30
vargithubBranchProtectionCmd=&cobra.Command{
33
31
Use: "branch-protection",
34
32
Aliases: []string{"bp"},
35
33
Short: "Manages the branch protection for a repository",
36
-
Run: githubBranchProtectionCommand,
34
+
Hidden: true,
35
+
Run: func(cmd*cobra.Command, args []string) {
36
+
logger.Fatal("This command is deprecated and doesn't work anymore.")
37
+
},
37
38
}
38
39
39
-
vargithubBPEnablebool
40
-
vargithubBPDisablebool
41
-
vargithubBPManifestbool
42
-
vargithubBPDryRunbool
43
-
vargithubRepositorystring
44
-
vargithubRepositoryBranchstring
45
-
46
40
funcinit() {
41
+
githubAppAccessTokenGenerateCmd.Flags().StringP("app-id", "a", "", "the GitHub app ID (env: GPC_GITHUB_APP_ID)")
42
+
githubAppAccessTokenGenerateCmd.Flags().StringP("key", "k", "", "path to the private key to use for token generation (env: GPC_GITHUB_APP_KEY)")
43
+
githubAppAccessTokenGenerateCmd.Flags().StringP("org", "o", "", "GitHub org for the generated token (app needs to be installed in the org) (env: GPC_GITHUB_ORG)")
githubBranchProtectionCmd.Flags().BoolVar(&githubBPEnable, "enable", false, "Enable branch protection for the GitHub repository")
51
-
githubBranchProtectionCmd.Flags().BoolVar(&githubBPDisable, "disable", false, "Disable branch protection for the GitHub repository")
52
-
githubBranchProtectionCmd.Flags().BoolVar(&githubBPManifest, "manifest", false, "Toggle branch protection for all repos in the manifest")
53
-
githubBranchProtectionCmd.Flags().BoolVar(&githubBPDryRun, "dry-run", false, "Don't execute branch protection commands, only show what would be done.")
54
-
githubBranchProtectionCmd.Flags().StringVarP(&githubRepository, "repo", "r", "", "The GitHub repository name (e.g. Graylog2/graylog2-server")
55
-
githubBranchProtectionCmd.Flags().StringVarP(&githubRepositoryBranch, "branch", "b", "", "The GitHub repository branch (e.g. master")
0 commit comments