Giter VIP home page Giter VIP logo

github-java-sdk's Introduction

Hi ๐Ÿ‘‹, I'm Nabeel

A hands-on Software Architect and Machine Learning Expert from Pakistan

nabeelmukhtar

  • ๐ŸŒฑ Iโ€™m currently learning LLMs and Machine Learning Ops

  • ๐Ÿ’ฌ Ask me about Spring Boot, System Design, Machine Learning

  • ๐Ÿ“ซ How to reach me [email protected]

Connect with me:

nabeelmukhtar nabeelmukhtar

Languages and Tools:

aws azure docker elasticsearch gcp go graphql hadoop java kafka kubernetes mongodb mysql nestjs pandas postgresql python pytorch redis scikit_learn solr spring tensorflow typescript

nabeelmukhtar

ย nabeelmukhtar

nabeelmukhtar

github-java-sdk's People

Contributors

ahmedtalhakhan avatar aslakknutsen avatar nabeelmukhtar 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

Watchers

 avatar  avatar  avatar  avatar  avatar

github-java-sdk's Issues

aaa

/play pushit

Discussion property type

Hi,
Below Discussion's properties are wrong:
String author
long id

It should be:
User author
String id

Authentication?

It appears that authentication has not been implemented yet, at least on the issues management code, am I correct?

Immutable date format

Changing com.github.api.v2.services.dateFormat in ApplicationConstants.properties has no effect.
This is because RepositoryServiceImpl.getGsonBuilder() calls

gson.setDateFormat("yyyy-MM-dd'T'HH:mm:ss");

That overrides the value from ApplicationConstants.properties.
(quick fix suggestion - remove the line...)

Add @SerializedName("some_field") in schema

Some fields in schema objects are not filled by gson. Added an underscore to some fields in Repository class:

@SerializedName("created_at")
@SerializedName("has_wiki")
@SerializedName("has_issues")
@SerializedName("has_downloads")```

Optional arguments to createRepository() yield NullPointerException

The description and homePage parameters to the RepositoryService.createRepository() method should be optional. Passing them as null results the following:

java.lang.NullPointerException
    at java.net.URLEncoder.encode(URLEncoder.java:205)
    at com.github.api.v2.services.impl.GitHubApiGateway.encodeUrl(GitHubApiGateway.java:539)
    at com.github.api.v2.services.impl.GitHubApiGateway.getParametersString(GitHubApiGateway.java:403)
    at com.github.api.v2.services.impl.GitHubApiGateway.callApiPost(GitHubApiGateway.java:312)
    at com.github.api.v2.services.impl.GitHubApiGateway.callApiPost(GitHubApiGateway.java:273)
    at com.github.api.v2.services.impl.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:92)

Pattern to parse accessToken includes newline character

I receive strings ending with a newline character when using the OAuthService.getAccessToken() method. The authentication fails unless the newline is removed. The reason is this pattern in ApplicationConstants.properties:

com.github.api.v2.services.accessTokenPattern=access_token=([^&]+)(&expires=(\\d+))?

I tried changing the pattern to:

access_token=(\\w+)(&expires=(\\d+))?

and that works.

UserService.getUserOrganizations is broken.

An attempt to use the UserService.getUserOrganizations(String) will result in a URL like:

http://github.com/api/v2/json/thallgren/organizations?access_token=<my access token>

This used to work but apparently GitHub changed the API. In order to make it work, the URL must be:

http://github.com/api/v2/json/user/show/thallgren/organizations?access_token=<my access token>

Jobs API

Hi,
Great works. I tested it without any problems, except minor bug where I always get null for the job.getCreatedAt(). Is it happen to you?

Thanks

Organizations API

I get the following error everytime I try to access information related to a team within an organization.

{"error":"api route not recognized"}

Is there any quick fix available?

Error response is not reported

I'm trying to add a key using the UserService.addKey() method. The method executes OK but no key is added. I debugged this method and concluded that I indeed got a 401 response from the server. This error is however discarded since the addKey method just ignores the returned InputStream.

The callApiPost() will always return an InputStream regardless of success or failure so how is the caller of this method supposed to detect an error?

OSGi manifest

I created a fork of the sdk where I added OSGi bundle support. That entailed adding the OSGi Manifest, fixing some classpath issues, and removing the gson and junit jars.

https://github.com/cloudsmith/github-java-sdk

I'd be happy to contribute this if you find it interesting.

Branch version-3.0

Hi,
Are you going to merge branch version-3.0 to master or you will maintain them separetely?

Incorrect parsing of the result in UserService.getKeys()

The UserService.getKeys() will issue a GET with a URL similar to:

http://github.com/api/v2/json/user/keys?access_token=XXX

The response from that is JSON data that starts with

{"public_keys": [{"title": ...

The getKeys() method then looks for "keys" instead of "public_keys" which always yields a null result.

OrganizationServiceImpl.createTeam with doesn't work with multiple repositories

If you try to create a team and add multiple repositories - only one is added. This is because of

for (String repoName : repoNames) {
      parameters.put("team[" + ParameterNames.REPO_NAMES + "][]", repoName);
}

You can't add multiple values with one key to a map. I'm going to work on a fix but, no telling how elegant it may be...

ff

Baby.Flamingo.mp4

Test

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.