-
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
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
|
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. |
|
This looks good to me, just need the copilot suggestions implemented |
Co-authored-by: Sean Budd <seanbudd123@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Test with an add-on with a translated changelog: pass https://github.com/nvdaes/addon-datastore/actions/runs/19277774486/job/55121659461 |
|
Sorry, unfortunately, the changelog, which should be translated into Spanish, is in English in the json file. Seems a regression introduced by the parseConfigValue function or its application. I'll look at this in the next days. |
|
Test with an add-on with translated changelog: pass, and the changelog is translated in the json file: https://github.com/nvdaes/addon-datastore/actions/runs/19287166274/job/55150234283#step:15:40 |
seanbudd
left a comment
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.
Nice, thanks @nvdaes
|
Thanks for this nice work! Will the data be regenerated for existing add-ons of the store that already include a change log in their manifest? |
|
Cyrille wrote:
As far as I know, just translations (including translated changelogs), will be regenerated, but not all add-on data, i.e., if an add-on includes a changelog, but it was submitted before this PR is merged, the original changelog won't be available when data is regenerated in the future. |
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.