joshsoftware / joshsoftware/code-curiosity
Hackathon functionality
- Dominant language
- Ruby
- Stars
- 87
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
When there is a hackathon, the widget should be able to fetch data, score them and update the widget for only the contestants in the group.
- The data needs to be fetched every 5 minutes ( or configurable interval)
- CommitJob, ActivityJob should be fired for each member with :hackathon type, so that we can fetch for the interval, in this case 5 minutes.
- ScoreJob should be updated for the data
- Widget should be updated to show the leaders!
### Feature Approach
The idea is to ensure the the Hackathon feature sits on top of the standard CodeCuriosity subscription model **without** interfering with starting operations!
`Hackathon` is a `Subscription` that belongs to a `Group`, whose members participate in a `Round` that contributes to multiple `Repositories`
``` ruby
class Hackathon < Subscription
# Update interval in minutes.
field :update_interval, type: Integer, default: 15
# This is the group that is participating in the Hackathon
belongs_to :group
# Hackathon may specify repositories that the Group is working on.
# If blank, it means all contributions are accepted.
# inverse_of: nil ensures we don't mess up the Repository model.
has_and_belongs_to_many :repositories, inverse_of: nil
end
```
### UI Approach
- User clicks on "Create Hackathon" in the side menu bar.
- Page (similar to create Group) opens with following details:
- Name (maps to `Group#name` and `Round#name`)
- Start Date Time (maps to `Round#from_date`)
- End Date Time (maps to `Round#end_date`)
- Update Interval (maps to `Hackathon#update_interval`)
- Repositories can be added (optionally). Help text should clearly mention that if no repositories are added, the Hackathon will track all commits and activities of the members of the Hackathon.
- Create button
- On create, we create a Group with this name, Round with same name and a Hackathon object for that user and round and group.
- User can then "Add Members".
- For every member that is added, we create a `Hackathon` object that maps to the `Group` and `Round` in the Hackathon Object of the Group Owner.
- The Widget will show the points only for the `Round#hackathons`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.