nataliaElv commited on
Commit
0dca33a
1 Parent(s): c557b75

Initial metrics

Browse files
Files changed (2) hide show
  1. app.py +15 -3
  2. requirements.txt +3 -0
app.py CHANGED
@@ -1,5 +1,17 @@
1
  import streamlit as st
2
- import os
 
 
3
 
4
- x = st.slider('Select a value')
5
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ import pandas as pd
3
+ from github import Github
4
+ from datetime import datetime, timedelta
5
 
6
+ def get_issues(state):
7
+ g = Github(st.secrets["ACCESS_TOKEN"])
8
+ repo = g.get_repo(st.secrets["REPO_NAME"])
9
+ issues = repo.get_issues(state=state)
10
+ return issues
11
+
12
+
13
+ open_issues = get_issues(state="open")
14
+ st.metric("Open Issues", open_issues.totalCount)
15
+
16
+ closed_issues = get_issues(state="closed", type="issue")
17
+ st.metric("Closed Issues", closed_issues.totalCount)
requirements.txt CHANGED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ pandas
2
+ pygithub
3
+ datetime