-
Notifications
You must be signed in to change notification settings - Fork 3
chore: up to date linting and codeowners and misc #29
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughA new CODEOWNERS file has been introduced, and the lint workflow has been refactored for clarity, explicit permissions, and version pinning. The test workflow was adjusted to ensure a step runs regardless of previous outcomes. The README now documents a new input parameter, and error messages in the action include more detailed output. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Lint Workflow
participant Test Workflow
participant Action User
participant OPA
GitHub Actions->>Lint Workflow: Trigger on pull_request
Lint Workflow->>Lint Workflow: Run lint job (with pinned versions)
Lint Workflow->>Lint Workflow: Run conventional-title job
GitHub Actions->>Test Workflow: Trigger test workflow
Test Workflow->>Test Workflow: Run steps
Test Workflow->>Test Workflow: Always run "Test Local Action" step
Action User->>OPA: Run tests with test_mode (directory or file)
OPA-->>Action User: Return test results or error
Action User->>src/index.ts: Handle OPA error
src/index.ts->>GitHub Actions: Report failure with detailed OPA error
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (5)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Below is the Action testing on itself with this PR's source code against policies in
|
| File | Status | Passed | Total | Coverage | Details |
|---|---|---|---|---|---|
| ./examples/tests/track-using-labels_test.rego | ✅ PASS | 8 | 8 | 45.45% Uncovered Lines3, 5, 12-13, 23-26, 35, 37-38, 41 |
Show Details✅ test_track_different_branches✅ test_propose_non_empty_branch ✅ test_propose_empty_branch ✅ test_affected_directory ✅ test_affected_extension ✅ test_not_affected_directory ✅ test_not_affected_extension ✅ test_ignore_not_affected |
| ./examples/tests/cancel-in-progress-runs_test.rego | ✅ PASS | 2 | 2 | 83.33% Uncovered Lines16 |
Show Details✅ test_cancel_runs_allowed✅ test_cancel_runs_denied |
| ./examples/tests/enforce-module-use-policy_test.rego | ✅ PASS | 3 | 3 | 47.83% Uncovered Lines37, 42, 46, 52, 54, 57, 60-61, 64, 68, 78, 80 |
Show Details✅ test_deny_creation_of_controlled_resource_type✅ test_deny_update_of_controlled_resource_type ✅ test_allow_creation_of_uncontrolled_resource_type |
| ./examples/tests/readers-writers-admins-teams_test.rego | ✅ PASS | 6 | 6 | 83.33% Uncovered Lines16, 24, 28 |
Show Details✅ test_allow_writers✅ test_allow_admins ✅ test_allow_readers ✅ test_space_admin_access ✅ test_space_write_access ✅ test_space_read_access |
| ./examples/tests/do-not-delete-stateful-resources_test.rego | ✅ PASS | 5 | 5 | 85.71% Uncovered Lines34 |
Show Details✅ test_deny_s3_bucket_deletion✅ test_deny_db_instance_deletion ✅ test_deny_efs_file_system_deletion ✅ test_deny_dynamodb_table_deletion ✅ test_allow_instance_deletion |
| ./examples/tests/enforce-password-length_test.rego | ✅ PASS | 3 | 3 | 90.91% Uncovered Lines29 |
Show Details✅ test_deny_creation_of_password_with_less_than_16_characters✅ test_warn_creation_of_password_between_16_and_20_characters ✅ test_allow_creation_of_password_longer_than_20_characters |
| ./examples/tests/ignore-changes-outside-root_test.rego | ✅ PASS | 12 | 12 | 92.86% Uncovered Lines42 |
Show Details✅ test_affected_no_files✅ test_affected_tf_files ✅ test_affected_no_tf_files ✅ test_affected_outside_project_root ✅ test_ignore_affected ✅ test_ignore_not_affected ✅ test_ignore_tag ✅ test_propose_affected ✅ test_propose_not_affected ✅ test_track_affected ✅ test_track_not_affected ✅ test_track_not_stack_branch |
| ./examples/tests/notification-stack-failure-origins_test.rego | ✅ PASS | 7 | 7 | 96.67% Uncovered Lines80 |
Show Details✅ test_slack_notification_for_tracked_failed_run✅ test_no_slack_notification_for_non_tracked_run ✅ test_no_slack_notification_for_successful_run ✅ test_slack_notification_with_unknown_github_user ✅ test_pr_comment_for_tracked_failed_run ✅ test_no_pr_comment_for_non_tracked_run ✅ test_no_pr_comment_for_successful_run |
| ./examples/drift-detection.rego | 0 | 0 | N/A | Show DetailsNo test file found |
Report generated by 🧪 GitHub Actions for OPA Rego Test
Below is the Action testing on itself with this PR's source code against
|
| File | Status | Passed | Total | Coverage | Details |
|---|---|---|---|---|---|
| examples/tests/cancel-in-progress-runs_test.rego | ✅ PASS | 2 | 2 | 83.33% Uncovered Lines16 |
Show Details✅ test_cancel_runs_allowed✅ test_cancel_runs_denied |
| examples/tests/do-not-delete-stateful-resources_test.rego | ✅ PASS | 5 | 5 | 85.71% Uncovered Lines34 |
Show Details✅ test_deny_s3_bucket_deletion✅ test_deny_db_instance_deletion ✅ test_deny_efs_file_system_deletion ✅ test_deny_dynamodb_table_deletion ✅ test_allow_instance_deletion |
| examples/tests/enforce-module-use-policy_test.rego | ✅ PASS | 3 | 3 | 47.83% Uncovered Lines37, 42, 46, 52, 54, 57, 60-61, 64, 68, 78, 80 |
Show Details✅ test_deny_creation_of_controlled_resource_type✅ test_deny_update_of_controlled_resource_type ✅ test_allow_creation_of_uncontrolled_resource_type |
| examples/tests/enforce-password-length_test.rego | ✅ PASS | 3 | 3 | 90.91% Uncovered Lines29 |
Show Details✅ test_deny_creation_of_password_with_less_than_16_characters✅ test_warn_creation_of_password_between_16_and_20_characters ✅ test_allow_creation_of_password_longer_than_20_characters |
| examples/tests/ignore-changes-outside-root_test.rego | ✅ PASS | 12 | 12 | 92.86% Uncovered Lines42 |
Show Details✅ test_affected_no_files✅ test_affected_tf_files ✅ test_affected_no_tf_files ✅ test_affected_outside_project_root ✅ test_ignore_affected ✅ test_ignore_not_affected ✅ test_ignore_tag ✅ test_propose_affected ✅ test_propose_not_affected ✅ test_track_affected ✅ test_track_not_affected ✅ test_track_not_stack_branch |
| examples/tests/notification-stack-failure-origins_test.rego | ✅ PASS | 7 | 7 | 96.67% Uncovered Lines80 |
Show Details✅ test_slack_notification_for_tracked_failed_run✅ test_no_slack_notification_for_non_tracked_run ✅ test_no_slack_notification_for_successful_run ✅ test_slack_notification_with_unknown_github_user ✅ test_pr_comment_for_tracked_failed_run ✅ test_no_pr_comment_for_non_tracked_run ✅ test_no_pr_comment_for_successful_run |
| examples/tests/readers-writers-admins-teams_test.rego | ✅ PASS | 6 | 6 | 83.33% Uncovered Lines16, 24, 28 |
Show Details✅ test_allow_writers✅ test_allow_admins ✅ test_allow_readers ✅ test_space_admin_access ✅ test_space_write_access ✅ test_space_read_access |
| examples/tests/track-using-labels_test.rego | ✅ PASS | 8 | 8 | 86.36% Uncovered Lines3, 12, 41 |
Show Details✅ test_track_different_branches✅ test_propose_non_empty_branch ✅ test_propose_empty_branch ✅ test_affected_directory ✅ test_affected_extension ✅ test_not_affected_directory ✅ test_not_affected_extension ✅ test_ignore_not_affected#01 |
| ./examples/drift-detection.rego | 0 | 0 | N/A | Show DetailsNo test file found |
Report generated by 🧪 GitHub Actions for OPA Rego Test
Coverage report
Test suite run success15 tests passing in 1 suite. Report generated by 🧪jest coverage report action from bb77a46 |
Describe your changes
Reminder:
npm run buildto compile into the distribution/distfolder, which is the source code that the Action uses.Summary by CodeRabbit
Chores
Documentation
Bug Fixes