Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 7, 2025

The /roadmap page maintained a static list of 40+ hardcoded milestones that required manual updates. This PR replaces it with live GitHub Projects data fetched via the GitHub GraphQL API.

Changes

  • Removed hardcoded milestone data: Deleted ~450 lines of static milestone dictionaries from RoadmapView.get_context_data()
  • Added GitHub GraphQL API integration: Created fetch_github_projects() function that fetches live project data from GitHub
  • Implemented smart caching: Added 30-minute cache to reduce API calls and improve performance
  • Enhanced view logic: RoadmapView now fetches live projects with cache-first strategy and passes them to the template
  • Updated template: Displays live projects as interactive cards with progress bars, item counts, and timestamps

Before vs After

Before:

def get_context_data(self, **kwargs):
    context = super().get_context_data(**kwargs)
    milestones = [
        {"title": "...", "progress": "50%", ...},  # 40+ entries
        # ... 450 lines of hardcoded data
    ]
    context["milestones"] = milestones
    return context

After:

def get_context_data(self, **kwargs):
    context = super().get_context_data(**kwargs)
    
    # Try to get projects from cache first
    cache_key = "github_projects_data"
    projects = cache.get(cache_key)
    
    if projects is None:
        # Fetch from GitHub API
        projects = fetch_github_projects()
        # Cache for 30 minutes
        cache.set(cache_key, projects, 1800)
    
    context["projects"] = projects
    context["github_projects_url"] = "https://github.com/orgs/OWASP-BLT/projects?query=is%3Aopen"
    return context

Features

  • Live data: Fetches real-time project status from GitHub using GraphQL API
  • Progress tracking: Visual progress bars showing completion percentage
  • Item counts: Displays total, done, and open items for each project
  • Smart caching: 30-minute cache reduces API load
  • Graceful fallback: Shows alternative UI when API is unavailable
  • Proper sampling: Handles projects with >250 items via sampling and extrapolation
  • Responsive design: Works on all screen sizes with dark mode support

Technical Details

  • Uses GitHub GraphQL API v4 with ProjectsV2 schema
  • Configurable query limits (250 items, 20 field values per item)
  • Supports multiple completion status values ("Done", "Completed", "Closed", etc.)
  • Implements Django cache framework for performance
  • Comprehensive error logging and handling
  • Zero security vulnerabilities (CodeQL scan passed)

Screenshot

Updated roadmap page with live GitHub Projects data

The page now displays live project data with progress bars, item counts, and last updated timestamps, providing users with real-time visibility into the project's development status.

Original prompt

update the /roadmap page to use github projects - https://github.com/orgs/OWASP-BLT/projects?query=is%3Aopen


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 7, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits December 7, 2025 18:39
Co-authored-by: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com>
Co-authored-by: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com>
Copilot AI changed the title [WIP] Update the roadmap page to use GitHub projects Replace hardcoded milestone data with GitHub Projects link on /roadmap page Dec 7, 2025
Copilot AI requested a review from DonnieBLT December 7, 2025 18:46
@DonnieBLT DonnieBLT marked this pull request as ready for review December 7, 2025 18:50
Copilot AI review requested due to automatic review settings December 7, 2025 18:50
@github-actions github-actions bot added the files-changed: 2 PR changes 2 files label Dec 7, 2025
@github-actions github-actions bot added the pre-commit: passed Pre-commit checks passed label Dec 7, 2025
Copy link
Contributor

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 PR successfully modernizes the /roadmap page by replacing 450+ lines of hardcoded milestone data with a dynamic link to the organization's GitHub Projects board. This improves maintainability by eliminating the need for manual updates and provides users with real-time visibility into the project's development status.

Key Changes:

  • Removed hardcoded milestone dictionary containing 40+ static entries from RoadmapView.get_context_data()
  • Simplified view logic to pass only the GitHub Projects URL to the template
  • Redesigned template with a prominent CTA button linking to GitHub Projects and three feature cards explaining the benefits

Reviewed changes

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

File Description
website/views/core.py Removed 450+ lines of hardcoded milestone data; simplified RoadmapView.get_context_data() to provide only the GitHub Projects URL
website/templates/roadmap.html Replaced milestone list rendering with GitHub Projects CTA button and informative feature cards using proper Tailwind CSS styling

@github-actions github-actions bot added the tests: passed Django tests passed label Dec 7, 2025
@DonnieBLT
Copy link
Collaborator

@copilot we want to pull in the live projects data from Github and show it on this projects page please

Co-authored-by: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 7, 2025

@copilot we want to pull in the live projects data from Github and show it on this projects page please

Done! The roadmap page now fetches and displays live project data from GitHub using the GraphQL API.

The page shows:

  • Real-time project titles and descriptions
  • Progress bars with completion percentages
  • Item counts (total, done, open)
  • Last updated timestamps
  • Each project links directly to its GitHub Projects page

Data is cached for 30 minutes to reduce API calls. If the API is unavailable, the page gracefully falls back to showing a link to view projects directly on GitHub.

Commit: a2c5cd0

Screenshot of updated roadmap page with live GitHub Projects data

Copilot AI and others added 3 commits December 7, 2025 20:36
…handling

Co-authored-by: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com>
Co-authored-by: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com>
Copilot AI changed the title Replace hardcoded milestone data with GitHub Projects link on /roadmap page Fetch and display live GitHub Projects data on /roadmap page Dec 7, 2025
@DonnieBLT DonnieBLT merged commit 051884a into main Dec 7, 2025
1 check passed
@DonnieBLT DonnieBLT deleted the copilot/update-roadmap-page-github-projects branch December 7, 2025 20:41
@github-project-automation github-project-automation bot moved this from Backlog to Done in 📌 OWASP BLT Project Board Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

files-changed: 2 PR changes 2 files pre-commit: passed Pre-commit checks passed tests: passed Django tests passed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants