gitar

所属分类:Git
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2023-08-27 02:56:28
上 传 者sh-1993
说明:  Git所有遥控器。针对Github和Gitlab的git-cli工具,
(Git all remotes. git cli tool that targets both Github and Gitlab,)

文件列表:
.cargo/ (0, 2023-12-30)
.cargo/mutants.toml (32, 2023-12-30)
.envrc (392, 2023-12-30)
.vscode/ (0, 2023-12-30)
.vscode/settings.json (190, 2023-12-30)
Cargo.lock (55454, 2023-12-30)
Cargo.toml (788, 2023-12-30)
LICENSE (1054, 2023-12-30)
contracts/ (0, 2023-12-30)
contracts/git/ (0, 2023-12-30)
contracts/git/git_current_branch.txt (4, 2023-12-30)
contracts/git/git_push_failure.txt (181, 2023-12-30)
contracts/git/git_rebase_wrong_origin.txt (37, 2023-12-30)
contracts/git/git_status_clean_repo.txt (0, 2023-12-30)
contracts/git/git_status_modified_files.txt (14, 2023-12-30)
contracts/git/git_status_untracked_and_modified_files.txt (28, 2023-12-30)
contracts/git/git_status_untracked_files.txt (14, 2023-12-30)
contracts/github/ (0, 2023-12-30)
contracts/github/merge_request.json (16935, 2023-12-30)
contracts/gitlab/ (0, 2023-12-30)
contracts/gitlab/list_pipelines.json (864, 2023-12-30)
contracts/gitlab/merge_request.json (2052, 2023-12-30)
contracts/gitlab/merge_request_conflict.json (98, 2023-12-30)
contracts/gitlab/no_pipelines.json (3, 2023-12-30)
contracts/gitlab/project.json (4886, 2023-12-30)
contracts/gitlab/project_members.json (1119, 2023-12-30)
contracts/verify_git.sh (2620, 2023-12-30)
contracts/verify_github.py (3539, 2023-12-30)
contracts/verify_gitlab.py (6610, 2023-12-30)
demo.webm (540459, 2023-12-30)
flake.lock (3397, 2023-12-30)
flake.nix (2792, 2023-12-30)
justfile (894, 2023-12-30)
src/ (0, 2023-12-30)
src/api_defaults.rs (211, 2023-12-30)
... ...

# GitAR - Git All Remotes [![Build status](https://github.com/jordilin/gitar/actions/workflows/ci.yml/badge.svg)](https://github.com/jordilin/gitar/actions) - [GitAR - Git All Remotes](#gitar---git-all-remotes) - [Installation](#installation) - [Usage](#usage) - [Configuration](#configuration) - [Example open a merge/pull request](#example-open-a-mergepull-request) - [Worth a thousand words](#worth-a-thousand-words) - [Remotes supported](#remotes-supported) - [Operations supported](#operations-supported) - [Not yet supported](#not-yet-supported) - [Unit tests](#unit-tests) - [License](#license) Git multi-remote command line tool. Brings common development operations such as opening a pull request down to the shell. This is an alternative to both Github and Gitlab cli tools. The scope for now is smaller. If you happen to use both Gitlab and Github and wanted to just have one single tool, this can help. Some benefits: * It supports Gitlab and Github. One tool, to rul'em all. * Written in Rust. Fast and Parallelizes operations to gather data locally and remotely. * Common defaults. For example, the title of a pull requests is automatically set to the last commit. Defaults can be overriden when prompted. * Caches API read calls. Common remote calls like gather project data that does not change often (project id, namespace, members), so subsequent calls are very fast. I've only tested on MacOS and Linux. ## Installation ```bash cargo build --release ./target/release/gr --help ``` ## Usage **WARNING**: Before using, I'd recommend to familiarize yourself in a test git repository. Opening a merge request in particular, will fetch, rebase target remote branch to your feature local branch before pushing and opening a new merge request. ### Configuration Place your configuration information in a file called `$HOME/.config/gitar/api`. You'll need to gather a read/write API token from your Gitlab/Github account. Configuration follows a properties file format. ``` .property=value ``` Example configuration file: ``` # Gitlab.com gitlab.com.api_token= gitlab.com.cache_location=/home//.cache/gr gitlab.com.preferred_assignee_username= gitlab.com.merge_request_description_signature= # Github github.com.api_token= github.com.cache_location=/home//.cache/gr github.com.preferred_assignee_username= # github.com.merge_request_description_signature=@my-team # Your company gitlab gitlab.mycompany.com.api_token= ... ``` ### Example open a merge/pull request Create a configuration file with an API read/write token as explained above. ```bash gr mr create ``` * You are in a feature branch * It will fetch latest upstream origin/default-target-branch * It will rebase to your feature branch * Prompt for assignee user * Confirmation * Open a merge request ### Worth a thousand words [demo.webm](https://github.com/jordilin/gitar/assets/1031376/83a37d6e-e2eb-4b68-978e-816439b2c122) ## Remotes supported Gitlab and Github. ## Operations supported * Open/Merge/List/Close a pull request * Browse repository, merge request * Clone remote feature branch locally ## Not yet supported * Target a remote project different than your origin ## Unit tests JSON responses from Gitlab and Github are verified in the contracts folder. Those are used to generate mock responses for unit tests. ```bash cargo test ``` ## License This project is licensed under * MIT license ([LICENSE](LICENSE) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))

近期下载者

相关文件


收藏者