-
Notifications
You must be signed in to change notification settings - Fork 77
[Event] Affiliations #10764
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
[Event] Affiliations #10764
Conversation
This reverts commit b349796.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this 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 PR introduces a new Event::Affiliation model to store organization metadata such as team numbers for events. This replaces the previous approach of using a combination of Airtable, organization names, tags, and comments.
Key changes:
- Adds Event::Affiliation model with metadata stored as JSONB
- Implements affiliation management UI for FIRST, VEX, and Hack Club organizations
- Creates controller and policy for affiliation CRUD operations
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| db/schema.rb | Adds event_affiliations table with event reference, metadata JSONB, and name fields |
| db/migrate/*.rb | Creates migration files for event_affiliations table and null constraints |
| config/routes.rb | Adds affiliations resource routes under events |
| app/views/events/settings/_affiliations.html.erb | Creates main affiliations management UI |
| app/views/events/settings/_affiliation_form.html.erb | Creates form for adding/editing affiliations |
| app/views/events/edit.html.erb | Integrates affiliations tab into event settings |
| app/policies/event/affiliation_policy.rb | Implements authorization policy for affiliation management |
| app/models/event/affiliation.rb | Defines Affiliation model with metadata accessors and type helpers |
| app/models/event.rb | Adds has_many association to affiliations |
| app/controllers/events_controller.rb | Loads affiliations data for settings tab |
| app/controllers/event/affiliations_controller.rb | Implements CRUD operations for affiliations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
db/migrate/20250829022524_validate_make_metadata_and_name_not_null_on_event_affiliations.rb
Outdated
Show resolved
Hide resolved
db/migrate/20250829022524_validate_make_metadata_and_name_not_null_on_event_affiliations.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…null_on_event_affiliations.rb Co-authored-by: Copilot <[email protected]>
sampoder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is looking really good! just a few things to do
Co-authored-by: Sam Poder <[email protected]>
Co-authored-by: Sam Poder <[email protected]>
We were previously missing a reliable way to store metadata regarding orgs such as team numbers and forced to use a combination of Airtable, organization names, tags, and comments. Now we can track this info inside of affiliations. Organizations can self report information for us and we will also have to backfill for previous organizations. We are starting with affiliations for FIRST, VEX, and Hack Clubs.
Closes #10552