za3karia commited on
Commit
d78f00a
·
verified ·
1 Parent(s): beeb807

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -64,21 +64,21 @@ st.session_state['reponame'] = st.text_input("reponame")
64
 
65
  if st.button("sync"):
66
  st.session_state['sync'] = True
67
- contributors_list = get_contributors(st.session_state['reponame'], updated_token=st.session_state['private_token'])
68
- branches_list = get_repo_branches(st.session_state['reponame'], updated_token=st.session_state['private_token'])
69
  # Load button to fetch repo data (simulated with mock data)
70
  if st.session_state['sync']:
71
 
72
- st.session_state['selected_branches'] = branches_list
73
  st.session_state['selected_contributor'] = '' # Reset selected contributor
74
  # Branch selection
75
  branch_option = st.radio("Select branches:", options=["all", "specific"])
76
 
77
  if branch_option == "specific":
78
- st.session_state['selected_branches'] = st.multiselect("Select branches", options=branches_list, default=mock_branches)
79
 
80
  # Contributor selection
81
- st.session_state['selected_contributor'] = st.selectbox("Select contributor name", options=contributors_list)
82
 
83
  # Get recap button
84
  if st.button("Get Recap"):
 
64
 
65
  if st.button("sync"):
66
  st.session_state['sync'] = True
67
+ st.session_state['contributors_list'] = get_contributors(st.session_state['reponame'], updated_token=st.session_state['private_token'])
68
+ st.session_state['branches_list'] = get_repo_branches(st.session_state['reponame'], updated_token=st.session_state['private_token'])
69
  # Load button to fetch repo data (simulated with mock data)
70
  if st.session_state['sync']:
71
 
72
+ st.session_state['selected_branches'] = st.session_state['branches_list']
73
  st.session_state['selected_contributor'] = '' # Reset selected contributor
74
  # Branch selection
75
  branch_option = st.radio("Select branches:", options=["all", "specific"])
76
 
77
  if branch_option == "specific":
78
+ st.session_state['selected_branches'] = st.multiselect("Select branches", options=st.session_state['branches_list'], default=mock_branches)
79
 
80
  # Contributor selection
81
+ st.session_state['selected_contributor'] = st.selectbox("Select contributor name", options=st.session_state['contributors_list'])
82
 
83
  # Get recap button
84
  if st.button("Get Recap"):