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

CLOUDP-303333 Improve --file description for auto-generated commands #3709

Merged
merged 3 commits into from
Mar 5, 2025

Conversation

fmenezes
Copy link
Collaborator

@fmenezes fmenezes commented Mar 4, 2025

Proposed changes

Improve --file description for auto-generated commands

Jira ticket: CLOUDP-303333

Closes #[issue number]

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation in document requirements section listed in CONTRIBUTING.md (if appropriate)
  • I have addressed the @mongodb/docs-cloud-team comments (if appropriate)
  • I have updated test/README.md (if an e2e test has been added)
  • I have run make fmt and formatted my code

Further comments

@fmenezes fmenezes marked this pull request as ready for review March 4, 2025 18:36
@fmenezes fmenezes requested review from a team as code owners March 4, 2025 18:36
@github-actions github-actions bot added the need-doc-review Improvements or additions to documentation, will be reviewed by the docs team label Mar 4, 2025
Copy link
Contributor

github-actions bot commented Mar 4, 2025

APIx Bot :bowtie:: a message has been sent to Docs Slack channel 🚀.

@@ -60,7 +60,7 @@ jobs:
if: env.review_needed == 'true' && steps.append_comment.outputs.previous_comment_id == ''
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DOCS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should fix docs bot messages

@@ -253,7 +253,7 @@ func convertAPIToCobraCommand(command api.Command) (*cobra.Command, error) {
addVersionFlag(cmd, command, &version)

if needsFileFlag(command) {
cmd.Flags().StringVar(&file, flag.File, "", "path to the file which contains the api request contents")
cmd.Flags().StringVar(&file, flag.File, "", "path to the file which contains the api request contents, alternatively you may pass standard input")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this:

Path to your API request file. Leave empty to use stdin instead - you must provide one or the other, but not both.

The main reason we're changing this sentence is to:

  • Make it clear that either file or stdin is required
  • Make it clear that you have to provide one or the other but not both

That was the main feedback we got from the docs team.

@fmenezes fmenezes requested a review from jeroenvervaeke March 5, 2025 10:51
Copy link
Contributor

github-actions bot commented Mar 5, 2025

Coverage Report 📈

Branch Commit Coverage
master ae4fd9a 37.9%
CLOUDP-303333 1574728 37.9%
Difference 0%

Copy link
Contributor

@erabil-mdb erabil-mdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fmenezes fmenezes merged commit 243fcb7 into master Mar 5, 2025
20 of 22 checks passed
@fmenezes fmenezes deleted the CLOUDP-303333 branch March 5, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
atlascli need-doc-review Improvements or additions to documentation, will be reviewed by the docs team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants