File size: 484 Bytes
1e08812
0dca33a
 
 
1e08812
0dca33a
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import streamlit as st
import pandas as pd
from github import Github
from datetime import datetime, timedelta

def get_issues(state):
    g = Github(st.secrets["ACCESS_TOKEN"])
    repo = g.get_repo(st.secrets["REPO_NAME"])
    issues = repo.get_issues(state=state)
    return issues


open_issues = get_issues(state="open")
st.metric("Open Issues", open_issues.totalCount)

closed_issues = get_issues(state="closed", type="issue")
st.metric("Closed Issues", closed_issues.totalCount)