git-hooks icon indicating copy to clipboard operation
git-hooks copied to clipboard

Feature: circleci-config-validate Allow for optional --org-id

Open tomislacker opened this issue 1 year ago • 1 comments

Background

If utilizing hooks/circleci-config-validate.sh within a CircleCI Organization that perhaps has private Orbs, it's required to pass the --org-id string option to the circleci config validate sub-command.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                              ┃
┃  circleci config validate                                                    ┃
┃                                                                              ┃
┃                                                                              ┃
┃       Check that the config file is well formed.                             ┃
┃                                                                              ┃
┃  Aliases:                                                                    ┃
┃           validate, check                                                    ┃
┃                                                                              ┃
┃  Usage:                                                                      ┃
┃         circleci config validate <path> [flags]                              ┃
┃                                                                              ┃
┃  Local Flags:                                                                ┃
┃                                                                              ┃
┃   -h, --help                       help for validate                         ┃
┃       --ignore-deprecated-images   ignores the deprecated images error       ┃
┃       --org-id string              organization id used when a config depend ┃
┃ s                                                                            ┃
┃ on private orbs belonging to that org                                        ┃
┃   -o, --org-slug string            organization slug (for example:           ┃
┃ github/example-org), used when a config depends on private orbs belonging to ┃
┃ that org                                                                     ┃
┃   -v, --verbose                    Enable verbose output                     ┃
┃                                                                              ┃
┃  Global Flags:                                                               ┃
┃                                                                              ┃
┃       --host string         URL to your CircleCI host, also CIRCLECI_CLI_HOS ┃
┃ T                                                                            ┃
┃ (default "https://circleci.com")                                             ┃
┃       --skip-update-check   Skip the check for updates check run before ever ┃
┃ y                                                                            ┃
┃ command.                                                                     ┃
┃       --token string        your token for using CircleCI, also              ┃
┃ CIRCLECI_CLI_TOKEN                                                           ┃
┃                                                                              ┃
┃                                                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Feature Request

  • Create a parameter for the hook that could optionally pass an org-id to the circleci config validate sub-command in circleci-config-validate.sh hook.

tomislacker avatar Mar 14 '24 14:03 tomislacker

Feel free to send a pull request!

syntaqx avatar Jun 28 '24 22:06 syntaqx