Commit Graph

5 Commits (4d824a93b6884afb6c0c95c9dc13281691fd8823)

Author SHA1 Message Date
Aravinth Manivannan 4d824a93b6
feat: setup dummy env vars
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-09-19 00:47:47 +05:30
Aravinth Manivannan 9e4fb927f1
feat: add readme badge 2022-09-19 00:45:36 +05:30
Aravinth Manivannan 7961e6c569
fix: freeze python deps and check into git
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-09-19 00:45:07 +05:30
Aravinth Manivannan 9cac98368b
feat: validate with user and org policy and tests
ci/woodpecker/push/woodpecker Pipeline failed Details
COMPONENTS

    FORGE
	API client to interact with target forge, for which
	shared-hosting is provided. Base class and Gitea implementation
	in check/forge.py

    PAYMENT VALIDATOR
	API client to interact with payments backed. It tells if a user
	is a paying customer or not. Defined in check/payment.py

    ALERT
	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.

	WARNING
	    Using an undefined message code will result in raise
	    exceptions

    POLICY
	Features that are available to paying customers only. Defined in
	check/policy.py

USER POLICY
    - Only paying customers are allowed to create non-fork repositories
    - Non-paying customers are allowed to fork paying customers'
      repositories
    - Forks chain should contain at least one paying customer

ORG POLICY
    - At least 50% members of an organisation should be paying customers

TESTING STRATEGY
    Tests use dummy substitutes for `forge` API client, `payment
    validator` and the `alert` client.

    DATA
	- Test forge data is hard-coded and verified in
	  check/tests/test_forge.py.
	- Paying customer information is hard-coded in test_factory

    We run policies using this data and verify results
2022-09-19 00:34:38 +05:30
Aravinth Manivannan 6f1765329a
feat: init 2022-09-19 00:33:06 +05:30