Giter VIP home page Giter VIP logo

Comments (6)

bnb avatar bnb commented on May 24, 2024

@hemal7735 I've been thinking about how we're iterating over a large set of objects.

As I'm writing this, I just switched away from working on filtering for search.js and I'm realizing that we're only iterating over either 30 or 100 issues rather than the 50k that are open for that (which explains why there were some very commonly occurring repos when I was testing).

Would ❤️ to have your help on this if you'd like to take a stab at it!

A quick, additional thought:

The intent of lib/log.js is to produce a truly random issue – in the case of feeling-lucky, we're only doing that with a limited subset. As far as I know, all other projects are with in the per_page limit defined by @octokit/rest.js's Issue Search. I would like to ensure that we are truly producing a random issue. Killing two birds with one stone here would be the smart thing, if possible 👍

from good-first-issue.

hemal7735 avatar hemal7735 commented on May 24, 2024

@bnb I see there is a field called total_count in the response. We can utilize that to figure out the number of pages as default is 30 items per page. So the idea is:

  1. figure out the number of pages
  2. select random page
  3. select random issue from that page

We will be making 2 calls to octokit apis for this. I'm not sure how it will affect rate-limiting.

from good-first-issue.

hemal7735 avatar hemal7735 commented on May 24, 2024

Should not the intent of the lib/log.js is to create a loggable string from the issue passed as parameter ? and not select the project?

from good-first-issue.

bnb avatar bnb commented on May 24, 2024

Which line specifically are you referring to when you're talking about selecting the project @hemal7735? 🤔

As far as I can tell that's not currently the case – the project argument is only to pass in the name of the project. Could be wrong though 👍

from good-first-issue.

hemal7735 avatar hemal7735 commented on May 24, 2024

Sorry, my bad, I meant issues. Current implementation takes issues list and generates formatted string for each issues. I believe it should generate formatted string from one issue and project.

from good-first-issue.

hemal7735 avatar hemal7735 commented on May 24, 2024

PR is merged. Closing the issue.

from good-first-issue.

Related Issues (20)

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.