IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Verified Commit 38c1ed56 authored by Emi Simpson's avatar Emi Simpson
Browse files

[bug] Fix a bug that misreported repos to dashboards in some cases

parent f24a2d41
......@@ -85,7 +85,7 @@ class Dashboard(ABC):
return any(
True
for parent_source in project.get_data_sources(c)
for parent_source in project.get_data_sources(c, True)
for source in parent_source.expand_source()
for pattern in required_types
if match_types(source.source_type, pattern)
......@@ -197,7 +197,7 @@ class CommittersDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['CommittersDashboard']:
if Dashboard._validate_source_types(c, project, {'git'}):
return CommittersDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return CommittersDashboard([source.url for source in project.get_data_sources(c, True) if type(source) == Git])
else:
return None
......@@ -239,7 +239,7 @@ class CommitsDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['CommitsDashboard']:
if Dashboard._validate_source_types(c, project, {'git'}):
return CommitsDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return CommitsDashboard([source.url for source in project.get_data_sources(c, True) if type(source) == Git])
else:
return None
......@@ -287,7 +287,7 @@ class OsfActivityDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['OsfActivityDashboard']:
if Dashboard._validate_source_types(c, project, {'osf'}):
return OsfActivityDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return OsfActivityDashboard([source.url for source in project.get_data_sources(c, True) if source.source_type == 'osf'])
else:
return None
......@@ -355,7 +355,7 @@ class IssuesDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['IssuesDashboard']:
if Dashboard._validate_source_types(c, project, {'gitlab:issue', 'github'}):
return IssuesDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return IssuesDashboard([source.url for source in project.get_data_sources(c, True) if 'issue' in source.source_type or source.source_type == 'github'])
else:
return None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment