Skip to content

Instantly share code, notes, and snippets.

@altairlage
altairlage / listGithubOrgRepos.py
Last active February 28, 2019 13:47
List github repos under org creating a .csv file (github enterprise - python 3 - github api
import requests
import json
import argparse
import logging
github_api_url = "https://<github URL>/api/v3"
ghe_access_token = 'your github personal access token'
#logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO, filename='ghe_org_repo_list.log')
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
@altairlage
altairlage / convert_from_bitbucket.txt
Created December 20, 2018 18:57
How to checkout from Mercurial Bitbucket and fully commit to a github repo
1- Install mercurial
- apt-get install mercurial
2- Checkout bitbucket repo
- hg clone <repo url> -r <branch>
- EX - hg clone https://bitbucket.org/rptlab/reportlab -r default
3 - Create a git repo:
- cd reportlab
- git init
- git checkout -b master