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

Refactor all rego #141

Merged
merged 71 commits into from
Jan 15, 2024
Merged

Refactor all rego #141

merged 71 commits into from
Jan 15, 2024

Conversation

adhilto
Copy link
Collaborator

@adhilto adhilto commented Jan 8, 2024

🗣 Description

  • Move all shared rules/functions to the Utils.rego file
  • Make all Rego code v1 compliant
  • Make all Rego code conform to our Regal style checks

💭 Motivation and context

Closes #117.
Closes #69.

🧪 Testing

Tests I performed:

  • .\regal.exe lint --format github rego Testing passes (using the config file in the .regal folder)
  • .\opa_windows_amd64.exe check --rego-v1 rego Testing passes
  • Rego unit tests all pass
  • Ran ScubaGoggles for all products on both main and this branch, no diff observed

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • If applicable, All future TODOs are captured in issues, which are referenced in the PR description.
  • The relevant issues PR resolves are linked preferably via closing keywords.
  • All relevant type-of-change labels have been added.
  • I have read and agree to the CONTRIBUTING.md document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge Checklist

  • This PR has been smoke tested to ensure main is in a functional state when this PR is merged.
  • Squash all commits into one PR level commit using the Squash and merge button.

✅ Post-merge Checklist

  • Delete the branch to clean up.
  • Close issues resolved by this PR if the closing keywords did not activate.

@adhilto
Copy link
Collaborator Author

adhilto commented Jan 8, 2024

Sorry for creating a new PR. I renamed the branch without realizing that would cause the PR to close.

Copy link
Collaborator

@buidav buidav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments

rego/Chat.rego Outdated Show resolved Hide resolved
rego/Utils.rego Outdated Show resolved Hide resolved
rego/Utils.rego Outdated Show resolved Hide resolved
rego/Utils.rego Outdated Show resolved Hide resolved
rego/Utils.rego Outdated Show resolved Hide resolved
rego/Sites.rego Outdated Show resolved Hide resolved
rego/Groups.rego Outdated Show resolved Hide resolved
rego/Classroom.rego Outdated Show resolved Hide resolved
rego/Groups.rego Outdated Show resolved Hide resolved
rego/Calendar.rego Outdated Show resolved Hide resolved
@adhilto adhilto requested a review from buidav January 15, 2024 19:06
Copy link
Collaborator

@buidav buidav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit tests and smoke testing passed. Good to go.

@buidav buidav merged commit fa4433c into main Jan 15, 2024
3 checks passed
@buidav buidav deleted the refactor-rego branch January 15, 2024 20:15
@adhilto adhilto added this to the TBD 0.2 Milestone milestone Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Google Calendar Rego Add in the Regal Linter for OPA Rego
3 participants