You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created object for basic rule.
First step towards #9
By using Types in typescript we can differ what is the type of rule
easily. I also added checks to Joi to ensure that the rule has
everything required before individually validating it.
Added tests to evaluate the process thoroughly.
## Basic rule
Implemented the functionality of the basic rule.
Because every rule ends up being simplified into:
```typescript
{
min_approvals: number;
teams?: string[];
users?: string[];
}
```
I created a basic logic that evaluates that. After this, we can use the
result of those smaller conditions to evaluate the more complex rules.
I added a lot of tests and tried to do as many comments to explain the
logic as possible.
## Teams API
Created class which handles the teams token and obtains the team members
of a team.
This class is small but handles the token used for such authentication
and separates the concern.
If we decide to replace GitHub teams for on-chain data (like mentioned
in paritytech/opstooling#245) this would let us to simply switch the
implementation with minimal alterations.
Closes#22 and closes#9
Create simple rule which works without particular functionality: https://github.com/paritytech/pr-custom-review#basic-rule-syntax-
The text was updated successfully, but these errors were encountered: