Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uggla/gitlab-push-and-mr
Rust CLI tool to push the current commits and create an MR in Gitlab
https://github.com/uggla/gitlab-push-and-mr
async gitlab rust
Last synced: 5 days ago
JSON representation
Rust CLI tool to push the current commits and create an MR in Gitlab
- Host: GitHub
- URL: https://github.com/uggla/gitlab-push-and-mr
- Owner: uggla
- License: apache-2.0
- Created: 2019-12-18T22:55:23.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T10:58:41.000Z (almost 2 years ago)
- Last Synced: 2024-12-16T20:08:56.526Z (8 days ago)
- Topics: async, gitlab, rust
- Language: Rust
- Size: 91.8 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitlab-push-and-mr
[![gitlab-push-and-mr](https://github.com/uggla/gitlab-push-and-mr/actions/workflows/gitlab-push-and-mr.yml/badge.svg)](https://github.com/uggla/gitlab-push-and-mr/actions/workflows/gitlab-push-and-mr.yml)
Push and create an MR automatically using gitlab API and GIT.
You need a Gitlab account and a project there, plus an API key.
## Version
This project is a fork of https://github.com/zupzup/gitlab-push-and-mr customized to my needs.
Here is the article related to the above project: https://www.zupzup.org/async-awaitify-rust-cli
Changes compared to original code:
* All parameters are specified in a toml configuration file (describe below).
* Push phase authentication can be done using either user and password or ssh keys.
* Merge request can be assign to someone as an option.
* Update dependencies to the latest available stable revision## Run
All parameters must be configured into $HOME/.glpm/config.toml file:
```toml
user = "user_name"
password = "user_password"
ssh_key_file = "/home/user_name/.ssh/id_rsa"
ssh_passphrase = "user_passphrase"
apikey="gitlab_api_key"
mr_labels = ["DevOps"]
host = "http://gitlab.example.com"
```If password key is defined, user and password will be used to perform the authentication. Otherwise, it will use ssh_key_file and ssh_passphrase configuration keys.
## Usage examples
Execute:
```bash
// run tool
cargo run -- -d "Some Description" -t "Some Title"
``````bash
gitlab-push-and-mr -t "Some title" -a username -b main
```