Skip to main content
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

Note that if you are the owner of the repo only origin will be set

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

Metadata

Release files for hubsync 0.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hubsync 0.2.9
File Size Uploaded Provenance
hubsync-0.2.9.tar.gz 8.5 kB Without provenance Details

Release files / hubsync-0.2.9.tar.gz

Download URL hubsync-0.2.9.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fa8b0106c32c531b0831f4a942197202664f6f778dd1ae6e2ed381f8ee236caf
BLAKE2b-256 checksum
How to use checksums
2a92b36d975773ebf2c9fef5e6acfbf0436ab096f95e587c1da7368aaba1608e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for hubsync 0.2.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page