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

Implement rulesets #2795

Merged
merged 39 commits into from
Jun 17, 2023
Merged

Implement rulesets #2795

merged 39 commits into from
Jun 17, 2023

Commits on May 31, 2023

  1. Add repository ruleset and related structs

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed May 31, 2023
    Configuration menu
    Copy the full SHA
    958a8a0 View commit details
    Browse the repository at this point in the history
  2. Add GetAllOrganizationRepositoryRulesets

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed May 31, 2023
    Configuration menu
    Copy the full SHA
    1e2554c View commit details
    Browse the repository at this point in the history
  3. Extend ruleset struct with conditions

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed May 31, 2023
    Configuration menu
    Copy the full SHA
    6a93946 View commit details
    Browse the repository at this point in the history
  4. Create all the different rules

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed May 31, 2023
    Configuration menu
    Copy the full SHA
    5b15d81 View commit details
    Browse the repository at this point in the history
  5. Spilt out ruleset conditions in different types

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed May 31, 2023
    Configuration menu
    Copy the full SHA
    dc199b5 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2023

  1. Add missing requiredStatusChecks struct

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    90d803f View commit details
    Browse the repository at this point in the history
  2. Add CreateOrganizationRepositoryRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    8b3f493 View commit details
    Browse the repository at this point in the history
  3. Fix unhandled rulesetRule type message

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    f2b462f View commit details
    Browse the repository at this point in the history
  4. Add comments on the rule creations

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    113d39f View commit details
    Browse the repository at this point in the history
  5. Add GetOrganizationRepositoryRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    93e2a90 View commit details
    Browse the repository at this point in the history
  6. Add copyright metadata

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    3208f5c View commit details
    Browse the repository at this point in the history
  7. Add UpdateOrganizationRepositoryRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    f58936c View commit details
    Browse the repository at this point in the history
  8. Add DeleteOrganizationRepositoryRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    879e3e0 View commit details
    Browse the repository at this point in the history
  9. Add comment on ruleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    d89d75a View commit details
    Browse the repository at this point in the history
  10. Fix linting

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    51f34d4 View commit details
    Browse the repository at this point in the history
  11. Add tests for Rule_UnmarshalJSON

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    8d47d85 View commit details
    Browse the repository at this point in the history
  12. Fix newline linting

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    5439e29 View commit details
    Browse the repository at this point in the history
  13. Rename RuleSetRule to RepositoryRule

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    3f1a6b4 View commit details
    Browse the repository at this point in the history
  14. Add GetRulesForBranch

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    90c2a8d View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2023

  1. Add GetAllRulesets

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    0e828ee View commit details
    Browse the repository at this point in the history
  2. Add CreateRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    5589fc1 View commit details
    Browse the repository at this point in the history
  3. Add GetRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    8c128a6 View commit details
    Browse the repository at this point in the history
  4. Add UpdateRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    7696f52 View commit details
    Browse the repository at this point in the history
  5. Fix http method for UpdateOrganizationRepositoryRuleset

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    9db0040 View commit details
    Browse the repository at this point in the history
  6. Always return response when deleting rulesets

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    fc0b2f1 View commit details
    Browse the repository at this point in the history
  7. Update comments

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    5a90752 View commit details
    Browse the repository at this point in the history
  8. Small renaming and tidy up for consistency

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    5492131 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    fdbe041 View commit details
    Browse the repository at this point in the history
  10. Add includesParent query to GetAllRulesets

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    b814d7f View commit details
    Browse the repository at this point in the history
  11. Further tidy up comments

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    c390b09 View commit details
    Browse the repository at this point in the history
  12. Fix the test for RepositoryRule UnmarshalJSON

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    6ab01f8 View commit details
    Browse the repository at this point in the history
  13. Make fields in RulesetRepositoryConditionParameters optional

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    a7d82e3 View commit details
    Browse the repository at this point in the history
  14. Fix line break and spelling

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    fe12731 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2023

  1. Rename some vars

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 4, 2023
    Configuration menu
    Copy the full SHA
    b584269 View commit details
    Browse the repository at this point in the history
  2. Simplify Ruleset struct to use list of pointers

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 4, 2023
    Configuration menu
    Copy the full SHA
    ac74284 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Make BypassActor fields optional

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    b4eb612 View commit details
    Browse the repository at this point in the history
  2. Add testing for RepositoryRule UnmarshalJSON

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    ad0beca View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2023

  1. Switch parameters to *json.RawMessage type

    Signed-off-by: Daniel Liao <10663736+liaodaniel@users.noreply.github.com>
    liaodaniel committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    5618f6f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    221c3ee View commit details
    Browse the repository at this point in the history