This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import time | |
# Log into SevOne API. | |
address = 'http://sevone.com/api/v1/' | |
creds = {'name': 'user', 'password':'pass'} | |
r = requests.post( address + "authentication/signin", | |
data=json.dumps( creds ), | |
headers = { 'content-type': 'application/json' }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import Project from GitHub Enterprise Self Managed to Gitlab. | |
# More info: https://docs.gitlab.com/ee/user/project/import/github.html#use-the-api | |
# | |
# Usage ./github_import.sh repo_id <Repo name> | |
# To find repo_id and name of the repos, do something like: | |
# curl -L \ | |
# -H "Accept: application/vnd.github+json" \ | |
# -H "Authorization: Bearer <YOUR-TOKEN>" \ | |
# -H "X-GitHub-Api-Version: 2022-11-28" \ | |
# https://some.enterprise.com/api/v3/orgs/ORG/repos \ |