Pass custom form data to SCMTool.check_repository().
Review Request #12577 — Created Sept. 2, 2022 and submitted
Review Board 3.0.16 introduced support for custom forms for SCMTools,
storing any saved fields inRepository.extra_data
. However, this data
was never passed tocheck_repository()
, meaning that validation could
not happen based on this data for plain SCMTools (though it was passed
to hosting services).This change adds support for passing custom data to
check_repository()
. This requires that the implementation supports
**kwargs
(a deprecation warning will be emitted if not) and accepts
all arguments as keyword arguments in any order. This will be required
in Review Board 5. All custom form data will then be passed.In the process, some of the
RepositoryForm
code has been cleaned up.
There was a_build_repository_extra_data()
method that only worked for
hosting services, and was mostly made redundant when per-SCM subforms
were added. It's now been removed, utilizing the subform data instead.
Unit tests pass on Python 2 and 3.
Tested creating new GitHub repositories, verifying that hosting service
forms still worked correctly.Tested creating new standard Git repositories, with and without the
updates tocheck_repository()
.Tested creating a new repository for SOS making use of form data in
check_repository()
.
Summary | ID |
---|---|
4e7a46e02dda5a7c357ffe233b42a82366c9d017 |
Description | From | Last Updated |
---|---|---|
Could do :term:Local Site |
maubin | |
Add unused |
maubin | |
Could do :term:Local Site |
maubin | |
Should we add a Version Changed: to the class too? |
maubin | |
Should document the KeyError. |
maubin | |
Same Local Site comment as above. |
maubin | |
Same Local site comment as above. |
maubin | |
Could update this to be as descriptive as the other descriptions. |
maubin |
- Change Summary:
-
- Updated docstrings to use
:term:
for "Local Site" - Added a missing
, unused
- Added a missing
Version Changed
- Updated
RepositoryForm._clean_hosting_info
to document theValidationError
.
- Updated docstrings to use
- Commits:
-
Summary ID b72c4973e03b5b8faa782a333d88d72b2ef323e6 4e7a46e02dda5a7c357ffe233b42a82366c9d017