Skip to content

Commit f6fbd45

Browse files
Merge pull request #48 from mozilla/jira-insight
Adding jira-insight
2 parents b5983cf + 827f84f commit f6fbd45

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/app/monitor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from fastapi.responses import JSONResponse
88

99
from src.app import environment
10-
from src.jbi.services import jbi_service_health_map
10+
from src.jbi.services import jbi_service_health_map, jira_visible_projects
1111

1212
api_router = APIRouter(tags=["Monitor"])
1313

@@ -62,3 +62,9 @@ def head_lbheartbeat(request: Request):
6262
def version():
6363
"""Return version.json, as required by Dockerflow."""
6464
return environment.get_version()
65+
66+
67+
@api_router.get("/jira_projects/")
68+
def get_jira_projects():
69+
"""API for viewing projects that are currently accessible by API"""
70+
return jira_visible_projects()

src/jbi/services.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@ def jbi_service_health_map():
5454
"bugzilla": bugzilla_check_health(),
5555
"jira": jira_check_health(),
5656
}
57+
58+
59+
def jira_visible_projects():
60+
"""Returns list of projects that are currently accessible"""
61+
jira = get_jira()
62+
return jira.projects(included_archived=None)

0 commit comments

Comments
 (0)