Skip to content
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

Team data interaction #22

Closed
Bullrich opened this issue Jul 18, 2023 · 0 comments · Fixed by #23
Closed

Team data interaction #22

Bullrich opened this issue Jul 18, 2023 · 0 comments · Fixed by #23
Assignees

Comments

@Bullrich
Copy link
Collaborator

Add a class to obtain the users belonging to a team.

This will be used for the evaluation.

@Bullrich Bullrich added this to the Project launch milestone Jul 18, 2023
@Bullrich Bullrich self-assigned this Jul 18, 2023
Bullrich added a commit that referenced this issue Jul 25, 2023
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant