Skip to content

Conversation

@Samze
Copy link
Contributor

@Samze Samze commented Jan 8, 2026

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

  • A short explanation of the proposed change:

  • An explanation of the use cases your change solves

  • Links to any other associated PRs

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@Samze Samze force-pushed the quota_events branch 2 times, most recently from 1d7e014 to c87f139 Compare January 8, 2026 23:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds comprehensive audit event support for organization quota and space quota lifecycle operations in the Cloud Controller API.

Key Changes:

  • Introduces 9 new audit event types (4 for organization quotas, 5 for space quotas)
  • Creates event repository classes to record audit events for quota operations
  • Updates action classes to accept user audit information and record events
  • Updates controllers to pass user audit information to action classes

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/repositories/event_types.rb Adds 9 new event type constants for organization and space quota operations
app/repositories/organization_quota_event_repository.rb New repository for recording organization quota audit events (create, update, delete, apply)
app/repositories/space_quota_event_repository.rb New repository for recording space quota audit events (create, update, delete, apply, remove)
app/actions/organization_quotas_create.rb Updated to accept user_audit_info and record create events
app/actions/organization_quotas_update.rb Updated to accept user_audit_info and record update events
app/actions/organization_quota_delete.rb Updated to accept user_audit_info and record delete events
app/actions/organization_quota_apply.rb Updated to accept user_audit_info and record apply events for each organization
app/actions/space_quotas_create.rb Updated to accept user_audit_info and record create events
app/actions/space_quota_update.rb Updated to accept user_audit_info and record update events
app/actions/space_quota_delete.rb Updated to accept user_audit_info and record delete events
app/actions/space_quota_apply.rb Updated to accept user_audit_info and record apply events for each space
app/actions/space_quota_unapply.rb Updated to accept user_audit_info and record remove events
app/controllers/v3/organization_quotas_controller.rb Updated to pass user_audit_info to all quota action classes
app/controllers/v3/space_quotas_controller.rb Updated to pass user_audit_info to all quota action classes
spec/unit/repositories/event_types_spec.rb Updated expected event types list to include new quota events
spec/unit/actions/organization_quotas_create_spec.rb Added test coverage for audit event creation
spec/unit/actions/organization_quotas_update_spec.rb Updated all test calls and added audit event test coverage
spec/unit/actions/organization_quota_delete_spec.rb Updated initialization and added audit event test coverage
spec/unit/actions/organization_quota_apply_spec.rb Updated initialization and added audit event test coverage including multiple organizations
spec/unit/actions/space_quotas_create_spec.rb Added test coverage for audit event creation
spec/unit/actions/space_quota_update_spec.rb Updated all test calls and added audit event test coverage
spec/unit/actions/space_quota_delete_spec.rb Updated initialization and added audit event test coverage
spec/unit/actions/space_quota_apply_spec.rb Updated initialization and added audit event test coverage including multiple spaces
spec/unit/actions/space_quota_unapply_spec.rb Updated to use instance method and added audit event test coverage
docs/v3/source/includes/resources/audit_events/_header.md.erb Added documentation for new quota audit event types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant