Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebaplaza/jicli
Simple JIRA client to add worklog time to an issue
https://github.com/sebaplaza/jicli
api client jira rust worklog
Last synced: 27 days ago
JSON representation
Simple JIRA client to add worklog time to an issue
- Host: GitHub
- URL: https://github.com/sebaplaza/jicli
- Owner: sebaplaza
- Created: 2022-01-07T21:49:12.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-06T18:25:37.000Z (almost 3 years ago)
- Last Synced: 2023-10-20T23:01:29.541Z (about 1 year ago)
- Topics: api, client, jira, rust, worklog
- Language: Rust
- Homepage:
- Size: 57.6 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JICLI
Rust JIRA client
This is a simple JIRA client to helps to add worklog times into an issue.
[Crates](https://crates.io/crates/jicli)
## Requirements
You must a have rust tools ([rustup](https://rustup.rs/)) installed
## Install jicli via cargo
```sh
cargo install jicli
```## How to use it ?
Set these 3 environnements variables
```sh
export JIRA_URL=https://my-jira.com
export JIRA_USER=my_user
export JIRA_PASSWORD=my_password
```Then launch the client
ex: add 1 day into issue JIRA-362
```sh
jicli --issue JIRA-362 --time 1d
```To know all possible options
```shell
jicli --help
```## Integrations
For example, if your git brach includes the issue reference, you could write a shell function to deal with it automatically.
If your git branch looks like `feat/JIRA-234-my-awesome-feature` , you can write a bash function like this
Add this to your `~/.bashrc` or `~/.zshrc`
```bash
# jira time function
# ex: jt 1h (to add one hour to ticket)
function jt() {
# extract jira ticket from branch and add worklog time
jicli --time $1 --issue $(git branch --show-current --no-color | grep -Po '[A-Z]+-[0-9]+')
}
```Then, use it like this:
```sh
# add 1 day to issue JIRA-234
jt 1d
```