Skip to content

fix: support for --json on sites#8093

Merged
sean-roberts merged 2 commits intomainfrom
sr/deploy-docs
Mar 25, 2026
Merged

fix: support for --json on sites#8093
sean-roberts merged 2 commits intomainfrom
sr/deploy-docs

Conversation

@sean-roberts
Copy link
Copy Markdown
Contributor

netlify sites:create --json was not a documented option so agents fail with

 ›   Error: unknown option '--json'
 ›   See more help with --help

This is already supported in the feature it's just missing from the options causing errors

@sean-roberts sean-roberts requested review from a team as code owners March 25, 2026 17:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ea07b543-2cfe-4249-bfb1-8158b94d1f12

📥 Commits

Reviewing files that changed from the base of the PR and between 7a920fe and e385937.

📒 Files selected for processing (1)
  • tests/integration/commands/sites/sites.test.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a --json flag to the sites:create command to output project data as JSON.
  • Tests

    • Added an integration test verifying the sites:create JSON output when --json is used.

Walkthrough

A --json boolean flag was added to the netlify sites:create command in both docs (docs/commands/sites.md) and the command implementation (src/commands/sites/sites.ts), enabling output of project data as JSON. An integration test (tests/integration/commands/sites/sites.test.ts) was added to verify that when --json is passed the command emits JSON via the logJson helper with expected site fields (id, name, admin_url, ssl_url).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding support for the --json flag to the sites command, which aligns with the changeset modifications.
Description check ✅ Passed The description clearly explains the problem (--json option not recognized for sites:create), the error it causes, and that the underlying feature already exists. It directly relates to the changes made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sr/deploy-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

📊 Benchmark results

Comparing with 21282ea

  • Dependency count: 1,059 (no change)
  • Package size: 354 MB ⬆️ 0.00% increase vs. 21282ea
  • Number of ts-expect-error directives: 356 (no change)

@sean-roberts sean-roberts enabled auto-merge (squash) March 25, 2026 17:58
@sean-roberts sean-roberts merged commit c13e11f into main Mar 25, 2026
71 checks passed
@sean-roberts sean-roberts deleted the sr/deploy-docs branch March 25, 2026 18:15
sean-roberts pushed a commit that referenced this pull request Mar 25, 2026
🤖 I have created a release *beep* *boop*
---


## [24.6.1](v24.6.0...v24.6.1)
(2026-03-25)


### Bug Fixes

* support for --json on sites
([#8093](#8093))
([c13e11f](c13e11f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants