Expand description
Manage Github repositories from the command line. You can perform an action on one repository, or on all repositories that are configured in the configuration file.
This tool is still in development so some features may not work as expected
You can do the following:
- Sync a forked repository with its upstream parent repository.
- Sync tags from its parent repository
- Manage branches (create, delete)
- Manage tags (create, delete)
- Create releases with automatically generated release notes
- Create and merge pull requests
- Run various sanity checks on repositories
- Create a PR and automatically merge it, if possible
- Backup a repository, including to S3 if enabled at build time
- Send notifications to slack if the slack feature is enabled
- Do all of the above for a single repository, or for all configured repositories
Some examples of how to use this tool:
git_sync tag create --tag v1.0.2 --branch my_dev_branch --repo https://github.com/org/my_repository
git_sync tag create --tag v1.0.0 --branch my_common_dev_branch --all --slack # will use all repos in your config file and enable slack notifications
When running a command with –all, you can specify which category of repositories to run the
command on by specifying the --repository
argument (valid options are ‘fork’, ‘private’,
‘public’, or ‘all’).
You can generate manpages and shell completions using the generate command:
git_sync generate --kind man
git_sync generate --kind bash # or fish, or zsh
When building this tool, you should use
cargo auditable build --release
cargo-auditable and cargo-audit can be installed by running
cargo install cargo-audit cargo-auditable
This way the binary will be built with information about the build dependencies embedded into
the binary so that it can be scanned with tools like cargo-audit
or Trivy.
Modules§
Macros§
- async_
retry - A macro to easily retry asynchronous operations with exponential backoff and optional error filtering.
- handle_
api_ response - Handles the result of an API call using octocrab and maps them
to a
GitError
. This helps reduce a lot of unnecessary boilerplate. This is used for api calls that don’t already have a high level function provided by Octocrab. - handle_
futures_ unordered - Handles reducing some of the boiler plate for defining these unordered futures.
Functions§
- main 🔒