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

Add schema consistency check #488

Merged
merged 4 commits into from
Feb 6, 2025
Merged

Conversation

daogrady
Copy link
Contributor

@daogrady daogrady commented Feb 6, 2025

cds-typer supports a bunch of CLI parameters that can all also be specified via cds.env.
To receive code completion for these options when editing a project's package.json, these options, default values, and descriptions also have to be maintained in cds-typer's package.json.
The latter can be generated automatically using a utility script. But if anyone adds a new configuration option and forgets to run this script, the code completion will be incorrect.
The workflow introduced in this PR therefore blocks any PR where the author apparently forgot to run the script.

@daogrady daogrady added the skip changelog Do not require an entry in the changelog label Feb 6, 2025
@daogrady
Copy link
Contributor Author

daogrady commented Feb 6, 2025

The option this PR is currently failing on is the reason for this PR. It will go away once that PR is merged and this PR is rebased against main.

@daogrady daogrady requested a review from joergmann February 6, 2025 14:04
@joergmann
Copy link
Contributor

joergmann commented Feb 6, 2025

lgtm, another option would be to add a commit with the updated schema. Even if user forgets, he will get a zwangscommit with the schema into his PR

@daogrady
Copy link
Contributor Author

daogrady commented Feb 6, 2025

I had considered that, but I am always super cautious with automatic commits to human PRs. I guess we could have automatically stacked another PR with the required change on top, but I hope we won't see too many changes to the CLI options in the long run.

@daogrady daogrady enabled auto-merge (squash) February 6, 2025 15:52
@daogrady daogrady merged commit 72b8483 into main Feb 6, 2025
20 checks passed
@daogrady daogrady deleted the feat/schema-consistency-check branch February 6, 2025 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog Do not require an entry in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants