Git Product home page Git Product logo

goji's Introduction

goji Build Status Software License crates.io Released API docs Master API docs

a rust interface for jira

install

Add the following to your Cargo.toml file

[dependencies]
goji = "0.2"

usage

Please browse the examples directory in this repo for some example applications.

Basic usage requires a jira host, and a flavor of jira::Credentials for authorization. For user authenticated requests you'll typically want to use jira::Credentials::Basic with your jira username and password.

Current support api support is limited to search and issue transitioning.

extern crate env_logger;
extern crate goji;

use goji::{Credentials, Jira};
use std::env;

fn main() {
    drop(env_logger::init());
    if let (Ok(host), Ok(user), Ok(pass)) =
        (
            env::var("JIRA_HOST"),
            env::var("JIRA_USER"),
            env::var("JIRA_PASS"),
        )
    {
        let query = env::args().nth(1).unwrap_or("assignee=doug".to_owned());

        let jira = Jira::new(host, Credentials::Basic(user, pass)).unwrap();

        match jira.search().iter(query, &Default::default()) {
            Ok(results) => {
                for issue in results {
                    println!("{:#?}", issue);
                }
            }
            Err(err) => panic!("{:#?}", err),
        }
    }
}

what's with the name

Jira's name is a shortened form of gojira, another name for godzilla. Goji is a play on that.

Doug Tangren (softprops) 2016-2018

goji's People

Contributors

aceeri avatar bm13kk avatar cholcombe973 avatar expobrain avatar icepuma avatar mikeastock avatar mrobakowski avatar softprops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

goji's Issues

Serialization error on empty Query

let jira = Jira::new(host, credentials)?;
jira.search().list(jql, &SearchOptions::default())?;

Does cause an serialization error in case the jql query returns empty.

Serialization Error: missing field `expand` at line 1 column 51

Use usize in *Results structs

I noticed that *Results struct like SprintResults uses u64 for size-related numerical value.

I found also that at some point in the past they were defined as usize but then converted into u64.

Considered that Jira runs on the JVM where the int type is a i32 and tha AFAIK the idiomatic type for indexing and sizing in Rust is usize does it make sense to change those fields to usize to be consistent.

Or am I missing something?

New release

Hey,

could you please release the latest changes of goji to crates.io. That would be awesome :)

Release

Could you please release goji. The bumped versions should fix a problem that I have with the openssl crate.

Best regards
Stefan

[Question] How to create issue with custom fields?

Hi,

I'm a Rust beginner. So far, I could manage everything I wanted to do with goji. Thanks for your work on that thing!

I just don't know how to create an issue with custom fields. Is this even possible with the current version of goji? I know, that I just need to create a Fields struct and all the other structs it uses internally, but there seems to be no option for adding custom fields...

If this is not possible, it would be nice if one could optionally create their "own" Fields struct to customize the creation of issues.

Is anyone in the community maintaining an active fork?

Hi @ll,

I was wondering if anyone who has forked this repo is actively maintaining their fork to add new features and make bugfixes. The project seems abandoned to me (the last merged PR was almost 2 years ago).

My main goal is to bring goji to async. Maybe I could just implement it and make a PR.

If not, I'm thinking of making a fork that is more or less actively maintained. I'm usually a little short of time, so it would be nice if someone would be willing to co-maintain the fork (help to take care of PRs and so on). I would also try including all the open pull requests.

BR
Beh

`Error` doesn't implement `std::error::Error`

The Error type does not implement std::error::Error and therefore cannot be easily used with '?' (or try!()). I would recommend building the Error type with the error_chain!() macro, as it avoid the boilerplate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.