GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aoxa/jcabi-github: Object Oriented Wrapper of Github API

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

2,004 Commits
2,004 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
src
src
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.rultor.yml
.rultor.yml
 
 
.travis.yml
.travis.yml
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
appveyor.yml
appveyor.yml
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Made By Teamed.io DevOps By Rultor.com

Build Status Build status Maven Central

More details are here: github.jcabi.com. Also, read this blog post: Object-Oriented Github API.

Set of classes in com.jcabi.github package is an object oriented API of Github:

public class Main {
  public static void main(String[] args) throws IOException {
    Github github = new RtGithub(".. your OAuth token ..");
    Repo repo = github.repos().get(
        new Coordinates.Simple("jcabi/jcabi-github")
    );
    Issue issue = repo.issues().create("How are you?", "Please tell me...");
    issue.comments().post("My first comment!");
  }
}

We also provide MkGithub, a mock version of Github server, which you can use in unit tests, for example:

public class FooTest {
  public void submitsCommentToGithubIssue() {
    final Repo repo = new MkGithub().repos().create(
      Json.createObjectBuilder().add("name", "test").build()
    );
    final Issue issue = repo.issues().create("how are you?", "");
    new Foo(issue).doSomething(); // should post a message to the issue
    MasterAssert.assertThat(
      issue.comments().iterate(),
      Matchers.iterableWithSize(1)
    );
  }
}

Questions?

If you have any questions about the framework, or something doesn't work as expected, please submit an issue here.

How to contribute?

Fork the repository, make changes, submit a pull request. We promise to review your changes same day and apply to the master branch, if they look correct.

Please run Maven (3.1 or higher!) build before submitting a pull request:

$ mvn clean install -Pqulice

There are many integration tests that check our classes against live Github accounts. In order to run them, you should create a new Github OAuth access token (how?), and provide it in command line, like this:

$ mvn clean install -Dit.test=RtGistITCase -Dfailsafe.github.key=<token> -Dfailsafe.github.repo=<repo>

Replace <token> with the OAuth access token, and <repo> with the name of repository you create in your account (for test purposes only), for example yegor256/test. RtForksITCase requires additional parameter -Dfailsafe.github.organization= where is an organization name to fork test github repository.

In order to run static analysis checks only use this:

$ mvn clean install -DskipTests -Dinvoker.skip=true -Pqulice

About

Object Oriented Wrapper of Github API

github.jcabi.com

Resources

Readme
License
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.