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

use default value for required arg if not provided #763

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pkbhowmick
Copy link
Collaborator

what

why

references

coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 5, 2024
@osterman osterman added the minor New features that do not break anything label Nov 6, 2024
Co-authored-by: Erik Osterman (CEO @ Cloud Posse) <[email protected]>
coderabbitai[bot]
coderabbitai bot previously approved these changes Nov 7, 2024
@osterman
Copy link
Member

osterman commented Nov 9, 2024

@pkbhowmick this PR is now in conflict

@osterman
Copy link
Member

Please add something to this page: https://atmos.tools/core-concepts/custom-commands/

@osterman
Copy link
Member

@coderabbitai can you suggest the changes to documentation related to this PR

Copy link
Contributor

coderabbitai bot commented Nov 11, 2024

Tip

For best results, initiate chat on the files or code changes.

@osterman, here's a suggestion for updating the documentation related to this PR:

Add a section to the Custom Commands documentation explaining that atmos now uses the default value for a required argument if it's not provided. This enhances flexibility when invoking custom commands.

For example, you could add:

### Default Values for Required Arguments

Atmos allows you to define default values for required arguments in your custom commands. If a required argument is not provided when the command is invoked, atmos will use the specified default value.

**Example:**

Given a custom command configuration:

```yaml
commands:
  deploy-stack:
    description: "Deploy a stack."
    arguments:
      - name: "environment"
        description: "The environment to deploy."
        required: true
        default: "dev"

You can now run:

atmos deploy-stack

Atmos will use "dev" as the default value for the environment argument.


This update will inform users about the new behavior introduced in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor New features that do not break anything
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants