-
-
Notifications
You must be signed in to change notification settings - Fork 286
Description
We recently introduced the Board Candidates page, which uses our custom ContributionHeatmap component instead of the previous 3rd-party widget. We now want to reuse this component to display contribution activity on Chapter and Project pages (similar to how it currently works for users/members).
This requires both frontend integration and backend data collection improvements.
Scope
1. Backend: Gather Chapter/Project Contribution Data
The main challenge is collecting and aggregating contributions for chapters and projects. Required contribution types (all must include a date):
- Commits
- Issues
- Pull Requests
- Releases
Requirements:
-
Collect contributions up to 1 year back.
-
Extend the existing repository sync workflow to fully support:
- Commit syncing
- Issues, PRs, and Releases within the required date range
-
Implement a dedicated management command (I recommend refactoring/extending owasp_aggregate_projects.py) that aggregates stored contributions into a JSON field on Chapter/Project models:
- Format:
{ "YYYY-MM-DD": count, ... } - This will be consumed by the heatmap component.
- Format:
2. Backend: GraphQL Updates
- Update GraphQL types and resolvers for Chapters and Projects to expose the aggregated heatmap data.
- Add adequate test coverage for resolvers and data formatting.
3. Frontend: Use ContributionHeatmap Component
-
Reuse the
ContributionHeatmapcomponent on:- Chapter pages
- Project pages
-
Perform any minor refactoring needed to support this new context.
-
Ensure the UI gracefully handles:
- No data
- Partial data
- Loading states
-
Add/update frontend tests.
4. Final Step: Contribution Aggregation Command
- Implement a standalone management command to perform chapter/project contribution aggregation on demand (and integrate it into scheduled tasks if needed).
Testing Requirements
-
Backend tests for:
- Sync job extensions
- Contribution aggregation logic
- GraphQL schema & resolvers
-
Frontend tests for:
- Component rendering
- GraphQL query integration
- Pages showing heatmap correctly
Metadata
Metadata
Assignees
Labels
Type
Projects
Status