Code Monkey home page Code Monkey logo

octokit.cr's Issues

Error when doing the Getting Started

In test.cr:

require "octokit"

# Create a new Octokit Client
github = Octokit.client("curquiza", "password")

# Fetch information about the logged in user
pp github.user

# Fetch information about another user
pp github.user("asterite")

puts "Hello"

shards.yml:

name: crystal-test
version: 0.1.0

authors:
  - your-name-here <your-email-here>

targets:
  crystal-test:
    main: src/crystal-test.cr

dependencies:
  octokit:
    github: watzon/octokit.cr

crystal: 0.35.1

license: MIT

Run crystal run test.cr:

$ crystal run src/crystal-test.cr
In /usr/local/Cellar/crystal/0.35.1_1/src/logger.cr:124:3

 124 | def initialize(@io : IO?, @level = Severity::INFO, @formatter = DEFAULT_FORMATTER, @progname = "")
       ^---------
Warning: Deprecated Logger#initialize. Use `Log` module instead

A total of 1 warnings were found.
Fetching repositories
Unhandled exception: Missing hash key: HTTP::Headers::Key(@name="X-GitHub-OTP") (KeyError)
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/hash.cr:1030:9 in '[]'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/http/headers.cr:71:5 in '[]'
  from lib/octokit/src/octokit/error.cr:202:34 in 'required_header'
  from lib/octokit/src/octokit/error.cr:54:10 in 'error_for_401'
  from lib/octokit/src/octokit/error.cr:19:37 in 'from_response'
  from lib/octokit/src/octokit/connection.cr:160:9 in 'handle_error'
  from lib/octokit/src/octokit/connection.cr:137:7 in 'request'
  from lib/octokit/src/octokit/connection.cr:268:18 in 'fetch_page'
  from lib/octokit/src/octokit/connection.cr:289:9 in 'fetch_next'
  from lib/octokit/src/octokit/connection.cr:245:11 in 'fetch_all'
  from lib/octokit/src/octokit.cr:53:9 in '__crystal_main'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:105:5 in 'main_user_code'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:91:7 in 'main'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:114:3 in 'main'

Testing framework.

Having tests will make it easier to contribute. Maybe octokit could use the same framework setup as gitlab.cr?

Failure when running tests

On master, when doing:

$ shards install
...
$ crystal spec

....

In lib/halite/src/halite/features/logging/json.cr:47:28

 47 | @request_time = Time.now
                           ^--
Error: undefined method 'now' for Time.class

Did you mean 'new'?

New Fork / Project

Hi folks! ๐Ÿ‘‹

I went ahead and moved this project over to https://github.com/GrantBirki/octokit.cr. I kinda just assumed that this project isn't being actively worked on since the last commit was over three years ago. If that is not the case, and you would like me to contribute my changes back here let me know. Or if you would like me to continue working on it on my own, let me know.

I have already published a new version of the project that implements deployments on-par with octokit.rb and I plan on continuing out more features in the near future.

Labels

Hello!
I would like to do the labels methods.
Any tips or things to know before starting? ๐Ÿ˜„ I'm not sure to understand how the tests work in this package for example.

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.