Coder Social home page Coder Social logo

llorllale / youtrack-api Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 0.0 5.98 MB

Fluent, object-oriented Java wrapper for YouTrack's REST API.

Home Page: https://llorllale.github.io/youtrack-api

License: Other

Java 99.10% XSLT 0.24% Shell 0.44% Dockerfile 0.22%
youtrack youtrack-client java api api-client fluent-api oop

youtrack-api's Introduction

youtrack-api icon

EO principles respected here

codecov Build Status Maven Central PDD status Javadocs License

youtrack-api is a fluent, object-oriented Java API for YouTrack. Visit the project's site for more info.

Here's a snippet of its usage:

final YouTrack youtrack = new DefaultYouTrack(
    new PermanentToken(new URL("http://youtrack"), "your_token")
);
final User leader = youtrack.users()        //Users API under construction - see #246
  .filter(u -> u.loginName().equals("mike"))
  .findFirst().get();
youtrack.projects()
    .create("TP", "Test Project", leader)   //creates project
    .issues()
    .create("summary", "description")       //creates issue
    .comments()
    .post("Hello World!");                  //posts comment to the issue

Dependencies

Feedback

Please direct any questions, feature requests or bugs to the issue tracker.

How do I contribute?

Please view our guidelines for contributing here.

License

youtrack-api is licensed under the Apache License, Version 2.0. A copy of the license has been included in LICENSE.


Icon made by Freepik from www.flaticon.com is licensed by CC BY 3.0

youtrack-api's People

Contributors

llorllale avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

youtrack-api's Issues

Issue priority

  • Retrieve all possible issue priorities
  • Update an issue's priority

Various documentation issues

  • The snippet included in the site index page directly creates an instance of YouTrack (the interface) as opposed to DefaultYouTrack
  • Expand usage.md

Javadoc for IssueSpec

The scope for IssueSpec is not clear in its javadoc. What fields does it include? What fields does it not include? Why not?

Hide util and util.response packages

Related to #91

Merge packages org.llorllale.youtrack.api.util and org.llorllale.youtrack.api.util.response into org.llorllale.youtrack.api and give all those classes/interfaces package access so that they are not reachable by users.

Javadoc in project site including unwanted packages

Packages that should be left out of javadocs:

  • org.llorllale.youtrack.api.jaxb
  • org.llorllale.youtrack.api.util
  • org.llorllale.youtrack.api.util.response

The javadocs deployed to maven central don't have this issue.

Issue types

  • Retrieve all possible issue types
  • Update an issue's type

Model issue

The following attributes of Issue are not always present in a YouTrack project:

  • State
  • Type
  • Priority
  • TimeTracking (?) - it can be disabled per project

These are all custom fields for projects in YouTrack, so what we should really have is a Project.fields() property that will list all assignable fields in a project, whereas in Issue we would have Issue.fields() which would list all fields that have been assigned to this issue.

Issue.spec()

Implement Issue.spec() to expose an issue as a spec. This will make it easier to check for any changes that a user desires to perform on an issue in an issue tracker.

Fix project README

Fix the project's README by adding:

  • Short project description and a link to the project's site
  • Badges:
    • CodeCov
    • Travis CI
    • Maven Central

travis.yml: error setting $VERSION

Introduced in #76.

The build job is adding all the maven "Download..." output to the value of VERSION. That is likely why this build step later fails with [ERROR] No plugin found for prefix 'https'.

Change 'all' method calls to return streams and not a collection

This would remove an unnecessary step.

Take for example the snippet provided in the about page:

//creating an issue
youtrack.projects()
    .all()                                    //list all projects
    .stream()
    .filter(p -> p.id().equals("project_id"))
    .get()
    .issues()
    .create(new IssueSpec("summary", "type")) //create issue for the selected project
    .comments()
    .post("This is my first comment!");       //posts a comment to the newly created issue

That extra all() in there seems redundant. We can easily change this to:

//creating an issue
youtrack.projects()
    .stream()                     //stream of all projects
    .filter(p -> p.id().equals("project_id"))
    .get()
    .issues()
    .create(new IssueSpec("summary", "type")) //create issue for the selected project
    .comments()
    .post("This is my first comment!");       //posts a comment to the newly created issue

Users can very easily reduce the stream to a list with Collectors.toList().

IssueSpec with custom fields

Enhance Issues.IssueSpec and Issues.update to include project's custom fields so that user is able to create an issue with more than just a summary and a description.

Remove unnecessary dependencies

Remove unnecessary dependencies in order to minimize "dependency hell" for users.

Some notes:

  • Easy pickings: commons-lang3, java-xmlbuilder
  • Not so easy pickings: guava (need to research alternatives for properly escaping URL fragments)
  • Very hard: HttpClient (both production code and tests heavily depend on this)

Here is a screenshot of our current dependency graph:

dependencies

Issue states

  • Retrieve all possible issue states
  • Update an issue's state

Get assignees of a Project

Their logins are already present in the project XML retrieved from YouTrack.

This will be useful for UsersOfIssue#assignTo(User).

Project logo

Find a suitable logo for the project and include both in the README and in the project's site.

Hide classes not intended for public use

The problem is that as a user of this library, when I wish to eg. import Issue with my IDE I get two results - org.llorllale.youtrack.api.Issue and org.llorllale.youtrack.api.jaxb.Isssue - which is confusing.

Build enhancements

  • (NEW) include continuous delivery to maven central
  • (NEW) Generate changelog
  • (NEW) Custom github project releases (include changelog)
  • (FIX) the site generation is not creating cobertura reports for integration tests

Travis Build failure

There is an error when trying to build the docker image for youtrack:

`[INFO] DOCKER> Pulling from library/java

[INFO] DOCKER> Digest: sha256:b91008e234402fc87e7889d6af1f36b6ece844c05989236d83d1f658a6f329b0

[INFO] DOCKER> Status: Downloaded newer image for java:8-jre

[INFO] DOCKER> Pulled java:8-jre in 9 seconds

[INFO] Building tar: /home/travis/build/llorllale/youtrack-api/target/docker/youtrack-api-test-0.1.0/tmp/docker-build.tar

[INFO] DOCKER> [youtrack-api-test-0.1.0:latest] "youtrack-api-integration-test": Created docker-build.tar in 92 milliseconds

[ERROR] DOCKER> Unable to build image [youtrack-api-test-0.1.0] : lstat youtrack/backup: no such file or directory [lstat youtrack/backup: no such file or directory ]

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 33.395 s

[INFO] Finished at: 2017-08-10T18:37:21+00:00

[INFO] Final Memory: 34M/274M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.21.0:build (youtrack-build) on project youtrack-api: Unable to build image [youtrack-api-test-0.1.0] : lstat youtrack/backup: no such file or directory -> [Help 1]`

Issue estimates

  • Get an issue's estimation
  • Get an issue's spent time
  • Set an issue's estimation

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.