feat: import link sources from YAML #266

Merged
erik merged 1 commit from feat/task-dc3cfd13-source-import into main 2026-07-22 15:19:38 -05:00
Owner

Summary

Add YAML-based bulk import for link sources with nested contacts and owner accounts.

Task

task-dc3cfd13

Changes

  • Add slug --site <name> sources import <file.yaml>.
  • Validate complete nested YAML documents with path-specific errors before mutations.
  • Create contacts, associate them to sources, and create contact-owned and source-owned accounts.
  • Add human and JSON import summaries and contextual API errors.
  • Document the YAML format and partial-import behavior.

Testing

  • CLI tests cover nested, minimal, invalid, and API-error imports
  • ./scripts/pre-pr.sh

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated
  • No unrelated changes included
## Summary Add YAML-based bulk import for link sources with nested contacts and owner accounts. ## Task task-dc3cfd13 ## Changes - Add `slug --site <name> sources import <file.yaml>`. - Validate complete nested YAML documents with path-specific errors before mutations. - Create contacts, associate them to sources, and create contact-owned and source-owned accounts. - Add human and JSON import summaries and contextual API errors. - Document the YAML format and partial-import behavior. ## Testing - [x] CLI tests cover nested, minimal, invalid, and API-error imports - [x] `./scripts/pre-pr.sh` ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated - [x] No unrelated changes included
feat: import link sources from YAML
Some checks failed
CI / build-lint-test (pull_request) Failing after 25s
4f0b37bb0c
Task: #task-dc3cfd13
Author
Owner

Review update

  • PR: #266 open; CI rerun #418 passed after #417 encountered an npm registry ECONNRESET.
  • Result: approved.
  • Scope: Adds validated YAML source imports with nested contacts and owner-specific accounts.

Acceptance criteria

  • Met: CLI README and source command spec document a nested YAML format for sources, contacts, and accounts.
  • Met: sources import <file.yaml> parses valid files and creates multiple sources through the existing API.
  • Met: Contacts are created first and their returned IDs are sent as the correct source contactIds.
  • Met: Account requests use the returned contact or source ID with the correct ownerType.
  • Met: Missing optional contacts and accounts default to empty and minimal sources import successfully.
  • Met: Malformed YAML, invalid nested fields, and API failures produce clear path-specific errors.

Quality

  • Blocking issues: none.
  • Warnings: none.
  • Verification: 116 CLI tests, complete ./scripts/pre-pr.sh, and Forgejo CI rerun #418 passed.

Final verdict: approved.

### Review update - PR: #266 open; CI rerun #418 passed after #417 encountered an npm registry `ECONNRESET`. - Result: approved. - Scope: Adds validated YAML source imports with nested contacts and owner-specific accounts. #### Acceptance criteria - **Met:** CLI README and source command spec document a nested YAML format for sources, contacts, and accounts. - **Met:** `sources import <file.yaml>` parses valid files and creates multiple sources through the existing API. - **Met:** Contacts are created first and their returned IDs are sent as the correct source `contactIds`. - **Met:** Account requests use the returned contact or source ID with the correct `ownerType`. - **Met:** Missing optional contacts and accounts default to empty and minimal sources import successfully. - **Met:** Malformed YAML, invalid nested fields, and API failures produce clear path-specific errors. #### Quality - Blocking issues: none. - Warnings: none. - Verification: 116 CLI tests, complete `./scripts/pre-pr.sh`, and Forgejo CI rerun #418 passed. **Final verdict: approved.**
erik merged commit e24bde82ec into main 2026-07-22 15:19:38 -05:00
erik deleted branch feat/task-dc3cfd13-source-import 2026-07-22 15:19:38 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit!266
No description provided.