nataliaElv
Initial metrics
0dca33a
raw
history blame
484 Bytes
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)