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

Created BASIC rule implementation #23

Merged
merged 15 commits into from
Jul 25, 2023
Merged

Created BASIC rule implementation #23

merged 15 commits into from
Jul 25, 2023

Conversation

Bullrich
Copy link
Collaborator

@Bullrich Bullrich commented Jul 18, 2023

Basic rule

Implemented the functionality of the basic rule.

Because every rule ends up being simplified into:

{
  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

@Bullrich Bullrich added this to the Project launch milestone Jul 18, 2023
@Bullrich Bullrich self-assigned this Jul 18, 2023
@Bullrich Bullrich requested a review from a team as a code owner July 18, 2023 16:16
@Bullrich Bullrich marked this pull request as draft July 19, 2023 10:42
@Bullrich Bullrich changed the title Created Team implementation Created BASIC rule implementation Jul 24, 2023
@Bullrich Bullrich marked this pull request as ready for review July 24, 2023 15:30
@Bullrich Bullrich requested review from mordamax and rzadp July 24, 2023 16:00
src/runner.ts Show resolved Hide resolved
src/runner.ts Outdated Show resolved Hide resolved
src/runner.ts Show resolved Hide resolved
And the sub class to review report
@Bullrich Bullrich requested a review from mordamax July 25, 2023 08:59
@Bullrich Bullrich merged commit dfce8aa into main Jul 25, 2023
5 checks passed
@Bullrich Bullrich deleted the team branch July 25, 2023 13:58
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 this pull request may close these issues.

Team data interaction Create basic rule
3 participants