-
Notifications
You must be signed in to change notification settings - Fork 3
Add ability to provide changelog for add-ons #52
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?
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
|
Ah - the idea is those are stripped too |
Yes, I plan to do it, probably this weekend or before. |
|
Test with an add-on including a changelog not translated: pass. The generated json file includes translated summary and description, and the changelog, but the changelog is not included in translations: https://github.com/nvdaes/addon-datastore/actions/runs/19206166951/job/54901672327 |
|
Test submitting an add-on with a translated changelog: pass. The generated json file contains the changelog and the translated changelog for es: https://github.com/nvdaes/addon-datastore/actions/runs/19206387890/job/54902181767 |
|
Test submitting an add-on without a changelog (and without translations): Pass. The generated json file contains a line with the following contents, which doesn't produce errors:
https://github.com/nvdaes/addon-datastore/actions/runs/19206656030/job/54902812136#step:15:40 |
|
@seanbudd, I think this is ready for review and perhaps merging. |
| changelog = manifest.get("changelog") # type: ignore[reportUnknownMemberType] | ||
| if changelog == "None": | ||
| # The config default is None | ||
| # which is parsed by configobj as a string not a NoneType | ||
| changelog = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this code can be removed as per https://github.com/nvaccess/addon-datastore-validation/pull/52/files#r2512900158
| changelog = manifest.get("changelog") # type: ignore[reportUnknownMemberType] | |
| if changelog == "None": | |
| # The config default is None | |
| # which is parsed by configobj as a string not a NoneType | |
| changelog = None |
|
This looks good to me, just need the copilot suggestions implemented |
This pull request adds support for a new
changelogfield to the add-on manifest and submission JSON schema, enabling tracking and validation of changes between add-on versions. The changes ensure that both the manifest and all related processing, validation, and test code can handle the newchangelogfield, including its translation in localized manifests.Schema and Manifest Updates:
changelogfield to theAddonManifestclass in_validate/addonManifest.py, and updated the manifest parsing logic to support reading and translating this field. [1] [2]_validate/addonVersion_schema.jsonto define thechangelogfield for both the base and translations, including examples and descriptions. [1] [2]changelogfield. [1] [2]Data Model and Processing:
AddonDatadataclass and related processing functions in_validate/createJson.pyto includechangelogand its translations, handlingNonevalues properly. [1] [2] [3]_validate/regenerateTranslations.pyto process thechangelogfield for both the main manifest and translations.Validation Logic:
checkChangelogMatchesin_validate/validate.pyto ensure the submissionchangelogmatches the manifest, and integrated it into the submission validation pipeline. [1] [2]Tests:
changelogfield, and updated existing tests and test data to include the new field and its expected values. [1] [2]These changes collectively introduce the
changelogfield into the add-on manifest and submission workflow, ensuring proper handling, validation, and testing throughout the codebase.