File size: 728 Bytes
b05ef13
88838c0
 
b05ef13
 
88838c0
 
 
 
b05ef13
88838c0
 
 
 
b05ef13
88838c0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def render_sidebar(client, structure):
    # Existing code...
    # GitHub Operations
    st.sidebar.subheader("๐Ÿ™ GitHub Operations")

    if GITHUB_TOKEN:
        # Proceed with GitHub operations
        source_repo = st.sidebar.text_input("๐Ÿ”— Source Repo URL")
        new_repo_name = st.sidebar.text_input("๐Ÿ†• New Repo Name", value=f"Clone-{datetime.now().strftime('%Y%m%d_%H%M%S')}")

        if st.sidebar.button("๐Ÿ“ฅ Clone Repository"):
            clone_github_repo(source_repo, new_repo_name)
        if st.sidebar.button("๐Ÿ“ค Push to New Repository"):
            push_to_new_repo(source_repo, new_repo_name)
    else:
        st.sidebar.warning("โš ๏ธ GitHub token not set. GitHub operations are disabled.")