Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S solstice-assets
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 33
    • Issues 33
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse FoundationEclipse Foundation
  • IT
  • Webdev
  • solstice-assets
  • Merge requests
  • !336

Draft: Add static source data fetching to projects widget

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Olivier Goulet requested to merge oliviergoulet/solstice-assets:oliviergoulet/master/299 into master Aug 10, 2022
  • Overview 1
  • Commits 1
  • Changes 2

This MR resolves #299 (closed)

Adds a isStaticSource data attribute for elements with the .featured-projects class which will indicate whether to fetch from a static source (if true) or from the projects api (if false or undefined).

I split the getProjectsData function into two new functions: getProjectsDataFromAPI and getProjectsFromStaticSource. They conditionally called depending on isStaticSource.

The code would work without the extraction but I thought it would be better to have a different function for different APIs. If we ever change the data structure for the projects api, I don't think we would want to manually change all the structures of the static sources.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: oliviergoulet/master/299

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent