Skip to main content

Get your github workspace synced!

Project description

https://travis-ci.org/Mariocj89/hubsync.svg?branch=master https://coveralls.io/repos/Mariocj89/hubsync/badge.svg?branch=master&service=github https://badge.fury.io/py/hubsync.svg

Hubsync

This script allows you to keep the organization you work in sync with your local workspace.

The main objective is to centralize your workflow and integrate all the syncronization and cleaning activities you perform daily related to your local file structure and your github organization

You can get it with pip by running “pip install hubsync”.

Want to contribute? Have a look to our guidelines

How it works

The script mainly relies on your config file “.hubsyncrc” to run all the commands and to customize how to sync your github projects locally

Based on the options within the config files it will sync locally all the organizations you belong too as folders and will create git repositories within them for each github repostory within the org.

Moreover, within your local repostiories it will delete all stale branches and set three remotes:

  • origin: url of the main repo (push is disabled)

  • upstream: url of the main repo (both pull and push)

  • fork: url of a fork of the repo within your user space

Config File

The hubsync config file contains all the configuration that hubsync requires and it is the main way to customize the script.

It should be located in in your home with the name .hubsyncrc (~/.hubsyncrc)

As your hubsyncrc file includes your github token, remember to make it not readable to any user but yourself.

chmod 600 ~/.hubsyncrc

Example

An example of its minimun content (mandatory params) is:

[github]
token: XXXXXXX
[workspace]
path: ~/workspace/test

See this guide about how to generate a token

All options

Below you can find all config options with an explanation and the default value

global

  • interactive: Set to false to never get prompted. Hubsync will use defaults always. (True)

  • sync_user: Sync user repositories locally? (True)

  • fork_repos: Create a fork of all organization repos in your user space. (False)

  • case_sensitive: Whether to considering the case when matching github repos and your local folders. (True)

github

  • api_url: base url of the github api, use this if you want to use hubsync in a github enterprise instance. (https://api.github.com)

  • token: github api token. Never share this with anyone.

org

  • pre: shell command to run before syncing an organization (None)

  • post shell command to run before syncing an organization (None)

repo

  • pre: shell command to run before syncing an repo (None)

  • post shell command to run before syncing an repo (None)

Note: Work ongoing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hubsync-0.2.7.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file hubsync-0.2.7.tar.gz.

File metadata

  • Download URL: hubsync-0.2.7.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hubsync-0.2.7.tar.gz
Algorithm Hash digest
SHA256 158efa671bbbf23936c601a3c36e174e946298fdb35fb9a7e055b004daa9e4ea
MD5 e7cab3ffc2fbc3dc7120b056ce4206e2
BLAKE2b-256 2e269be659a33caae4279ac6c697d64f7eaee11c53efe1150f51c44c6f7408a5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page