Skip to content

feat(cli): add scope field to contract list JSON output#3019

Merged
javirln merged 1 commit intochainloop-dev:mainfrom
javirln:javier/pfm-5413-add-scope-field-to-contract-list-json-output
Apr 10, 2026
Merged

feat(cli): add scope field to contract list JSON output#3019
javirln merged 1 commit intochainloop-dev:mainfrom
javirln:javier/pfm-5413-add-scope-field-to-contract-list-json-output

Conversation

@javirln
Copy link
Copy Markdown
Member

@javirln javirln commented Apr 9, 2026

Summary

  • Add a top-level scope string field to the WorkflowContractItem JSON output, always populated with "global" or "type/name" (e.g., "project/my-project")
  • This enables programmatic filtering of contracts by scope, unblocking GitOps reconciliation for contracts (PFM-5413)
  • The existing scopedEntity object field is preserved for backward compatibility

Ref: PFM-5413

The contract list command shows a SCOPE column in table output but the
JSON output omits scope for global contracts due to omitempty on the
ScopedEntity field. Add a top-level "scope" string field that is always
populated ("global" or "type/name"), enabling programmatic filtering.

Ref: PFM-5413
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
@javirln javirln self-assigned this Apr 9, 2026
@javirln javirln requested review from jiparis and migmartri April 9, 2026 14:48
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@javirln javirln merged commit 3211387 into chainloop-dev:main Apr 10, 2026
15 checks passed
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