API client to interact with target forge, for which
shared-hosting is provided. Base class and Gitea implementation
API client to interact with payments backed. It tells if a user
is a paying customer or not. Defined in check/payment.py
Alerting API that is called when a policy violation is
discovered. Defined in check/alert.py
An alert will include a message code and related data. All types
of alerts should have unique message codes.
Using an undefined message code will result in raise
Features that are available to paying customers only. Defined in
- Only paying customers are allowed to create non-fork repositories
- Non-paying customers are allowed to fork paying customers'
- Forks chain should contain at least one paying customer
- At least 50% members of an organisation should be paying customers
Tests use dummy substitutes for `forge` API client, `payment
validator` and the `alert` client.
- Test forge data is hard-coded and verified in
- Paying customer information is hard-coded in test_factory
We run policies using this data and verify results