Repository navigation
fix(schema): require project unless project-si-source is set #236
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,6 +113,16 @@ import ( | |
|
|
||
| // repository describes repository-related configurations, including status, policies, team members, documentation, license, releases, and security posture. Required for single-repository files and for child files in a multi-repository project (i.e. files that set `header.project-si-source`). Optional in a parent file when project-level information is the only thing the parent contributes. | ||
| repository?: #Repository | ||
|
|
||
| // A file without `header.project-si-source` must carry its own project information. | ||
| if header["project-si-source"] == _|_ { | ||
| project!: #Project | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 (medium) Heads-up:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thx for the heads-up, I haven't run gengotypes against this. I'd rather leave the Go types to a follow-up with si-tooling than add parser changes here, unless you want it in this PR.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 A follow-up works for me. Could you open an issue on ossf/si-tooling describing the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened ossf/si-tooling#80 for it. thx |
||
| } | ||
|
|
||
| // A child file that inherits project information must describe its repository. | ||
| if header["project-si-source"] != _|_ { | ||
| repository!: #Repository | ||
| } | ||
| } | ||
|
|
||
| // The Header object captures high-level metadata about the schema. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.