Commands for managing commits in the Knock CLI.
Commit commands enable you to manage commits in your Knock account from the CLI.
List all commits in the environment. Use an --environment flag to specify the target environment; if omitted, the Knock CLI defaults to the development environment.
The environment to use. Defaults to development.
Show only promoted or unpromoted changes between the given environment and the subsequent environment.
The total number to fetch per page.
Fetches all entries after this cursor.
Fetches all entries before this cursor.
The branch to use. Defaults to the main branch.
Filter commits by resource type. One of: email_layout, guide, message_type, partial, translation, workflow. Can be used alone or together with --resource-id.
Filter commits by the given resource identifier. This is most typically the key of the resource. In the case of translations, this will be the locale code and namespace, separated by a /. Must be used together with --resource-type.
Format output as json.
Shows the details of a given commit, using the id of the commit.
Format output as json.
You can commit all changes across all resources in the development environment with the commit command. Use --resource-type to commit only changes for a specific resource type, and optionally --resource-id to scope it further to a single resource.
The commit message to use for all changes.
The branch to use. Defaults to the main branch.
Removes the confirmation prompt. Defaults to false.
Commit only changes for the given resource type. One of: email_layout, guide, message_type, partial, translation, workflow. Can be used alone or together with --resource-id.
Commit only changes for the given resource identifier. Must be used together with --resource-type.
You can promote one change to the subsequent environment, or all changes across all resources to the target environment from its directly preceding environment, using the commit promote command.
Note:
- For example, if you have three environments "development", "staging", and "production" (in that order), setting the
--toflag toproductionwill promote all new changes from the staging environment to the production environment. - Promoting one single commit from staging using the
--onlyflag, will result in that commit being promoted to production. - The
--toenvironment must be a non-development environment. - The
--toand--onlyflags can't be used together.
The destination environment.
The target commit id to promote to the subsequent environment.
Removes the confirmation prompt. Defaults to false.