Coder Social home page Coder Social logo

github-issue-counter's People

Contributors

lukasreschke avatar morrisjobke 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

Watchers

 avatar  avatar  avatar

github-issue-counter's Issues

Error with the 'now' obj

How to reproduce:

  1. Clone the repo on macOS (v 10.13.6).
  2. Try to run process_issues.py
  3. This is the output:
./process_issues.py
Traceback (most recent call last):
  File "./process_issues.py", line 16, in <module>
    now = datetime.datetime.now(datetime.timezone.utc)
AttributeError: 'module' object has no attribute 'timezone'

import_issues attribute error

Hi, I'm trying out your script and I get this error when I try to import issues:

/var/www/github-issue-counter $ ./import_issues.py
Traceback (most recent call last):
  File "./import_issues.py", line 24, in <module>
    for i in gh.iter_repo_issues(ORG, REPO, state='all'):
  File "/usr/local/lib/python2.7/dist-packages/github3/models.py", line 58, in __getattr__
    raise AttributeError(attribute)
AttributeError: iter_repo_issues

Maybe I didn't use the correct GitHub Key, I wish you had more detailed steps to get it. I wen tinto my Gihub user's settings page (not the repo's settings page) and made a personal token with plenty of accesses.

Can you help me troubleshoot please? Thanks for your script!

Use GraphQL

An example GraphQL query that gathers most required information is

{
  repository(owner: "owncloud", name: "core") {
    issues(first: 100) {
      nodes {
        createdAt
        number
        timelineItems(itemTypes: [CLOSED_EVENT, REOPENED_EVENT], first: 10) {
          nodes {
            __typename
            ... on ClosedEvent {
              createdAt
            }
            ... on ReopenedEvent {
              createdAt
            }
          }
          pageInfo {
            hasNextPage
          }
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
  }
  rateLimit {
    limit
    cost
    remaining
    resetAt
  }
}

It is so cheap that we probably don’t need API token for public repositories.

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.