cutenode / good-first-issue Goto Github PK
View Code? Open in Web Editor NEW🖥 CLI for finding good first issues
🖥 CLI for finding good first issues
console.log('')
can be replace by
console.log(`\n`)
in most cases.
With #60 being merged, we've got a new developer command: npm run markdown
.
It would probably be wise to have a CI check to ensure this was run to lower maintenance burden on everyone ❤️
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
When testing to make sure nothing breaks, I semi-often get rate-limited by GitHub. This is because there are (IIRC) 50 queries accepted before 1-hour rate limiting kicks in.
Obviously this shouldn't be happening for a normal user (though I'd applaud a user that was working on dozens of good-first-issues), but it may happen for contributors.
Checklist:
There are a "few" branches which can be deleted:
Currently, lib/log.js
is iterating over issues
and forms output
array.
I see the oppurtunity of enhancement from both performance and modularity here.
If the log
module just create the output from issue
, and project
objects then,
@bnb @maddhruv your thoughts are welcome ! 💯
if possible I would like to work on that as well.
The module is currently lacking tests. This is something that is 100% needed but also something I'm entirely unfamiliar with. Would 💚 some help on this!
Tasks:
log
returns a properly formatted output without any undefined
(the repo name is especially tricky!)Contributors: Feel free to add items to this list!
I've gotten this a couple times recently. If anyone wants to tackle, feel free ❤️
$ good-first-issue
? Choose a project: debugger.html
(node:89426) UnhandledPromiseRejectionWarning: HttpError: Validation Failed
at /Users/cyren/GitHub/good-first-issue/node_modules/@octokit/request/dist-node/index.js:66:23
at processTicksAndRejections (internal/process/task_queues.js:89:5)
at async search (/Users/cyren/GitHub/good-first-issue/lib/search.js:18:20)
at async Command.<anonymous> (/Users/cyren/GitHub/good-first-issue/bin/good-first-issue.js:45:20)
(node:89426) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a
catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:89426) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
Currently, if a user runs too many searches they hit a rate limit. It would be awesome if we could pretty print a message about this rather than logging the JSON :)
~/GitHub/good-first-issue on master! ⌚ 16:23:45
$ good-first-issue
? Choose a project: EasyGraphQL - EasyGraphQL is a group of open source tools, with the main focus to help developers that use GraphQL or just want to sta
rt using it.
RequestError [HttpError]: API rate limit exceeded for 69.116.190.39. (But here's the good news: Authenticated requests get a higher rate limit. Check out
the documentation for more details.)
at /Users/cyren/GitHub/good-first-issue/node_modules/@octokit/request/dist-node/index.js:66:23
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async search (/Users/cyren/GitHub/good-first-issue/lib/search.js:18:20)
at async Command.<anonymous> (/Users/cyren/GitHub/good-first-issue/bin/good-first-issue.js:30:22) {
name: 'HttpError',
status: 403,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
connection: 'close',
'content-encoding': 'gzip',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Sat, 03 Aug 2019 20:23:50 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
status: '403 Forbidden',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'transfer-encoding': 'chunked',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': 'FE99:32E5:25E774:39DA78:5D45ED56',
'x-ratelimit-limit': '10',
'x-ratelimit-remaining': '0',
'x-ratelimit-reset': '1564863842',
'x-xss-protection': '1; mode=block'
},
request: {
method: 'GET',
url: 'https://api.github.com/search/issues?q=org%3Aeasygraphql%20is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&sort=updated&order=desc&per_page=30&page=1',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit.js/16.28.5 Node.js/12.7.0 (macOS Mojave; x64)'
},
request: { hook: [Function: bound bound register], validate: [Object] }
},
documentation_url: 'https://developer.github.com/v3/#rate-limiting'
}
Not sure why, but on my new machine the Jest tests are failing 🤔
FAIL lib/search.spec.js
● should return filtered issues if there is only one page
Cannot find module '@octokit/rest' from 'search.spec.js'
7 | jest.resetAllMocks()
8 | issues = jest.fn()
> 9 | jest.doMock('@octokit/rest', () => () => {
| ^
10 | return {
11 | search: {
12 | issues
at Resolver.resolveModule (../../.nvm/versions/node/v10.14.2/lib/node_modules/jest/node_modules/jest-resolve/build/index.js:221:17)
at Object.doMock (lib/search.spec.js:9:8)
● should return filtered issues if there is only one page
TypeError: search is not a function
64 | })
65 |
> 66 | return search({}).then(result => {
| ^
67 | expect(issues).toHaveBeenCalledTimes(1)
68 | expect(result).toEqual([
69 | {
at Object.search (lib/search.spec.js:66:10)
● should return filtered issues if there is more than one page
Cannot find module '@octokit/rest' from 'search.spec.js'
7 | jest.resetAllMocks()
8 | issues = jest.fn()
> 9 | jest.doMock('@octokit/rest', () => () => {
| ^
10 | return {
11 | search: {
12 | issues
at Resolver.resolveModule (../../.nvm/versions/node/v10.14.2/lib/node_modules/jest/node_modules/jest-resolve/build/index.js:221:17)
at Object.doMock (lib/search.spec.js:9:8)
● should return filtered issues if there is more than one page
TypeError: search is not a function
172 | })
173 |
> 174 | return search({}).then(result => {
| ^
175 | expect(issues).toHaveBeenCalledTimes(2)
176 | const searchParams = issues.mock.calls[1][0]
177 | expect(searchParams["page"]).toBeLessThanOrEqual(2)
at Object.search (lib/search.spec.js:174:10)
● should return filtered issues if there are more than allowed pages
Cannot find module '@octokit/rest' from 'search.spec.js'
7 | jest.resetAllMocks()
8 | issues = jest.fn()
> 9 | jest.doMock('@octokit/rest', () => () => {
| ^
10 | return {
11 | search: {
12 | issues
at Resolver.resolveModule (../../.nvm/versions/node/v10.14.2/lib/node_modules/jest/node_modules/jest-resolve/build/index.js:221:17)
at Object.doMock (lib/search.spec.js:9:8)
● should return filtered issues if there are more than allowed pages
TypeError: search is not a function
282 | })
283 |
> 284 | return search({}).then(result =>{
| ^
285 | expect(issues).toHaveBeenCalledTimes(2)
286 | const searchParams = issues.mock.calls[1][0]
287 | expect(searchParams["page"]).toBeLessThanOrEqual(34)
at Object.search (lib/search.spec.js:284:10)
● should throw
Cannot find module '@octokit/rest' from 'search.spec.js'
7 | jest.resetAllMocks()
8 | issues = jest.fn()
> 9 | jest.doMock('@octokit/rest', () => () => {
| ^
10 | return {
11 | search: {
12 | issues
at Resolver.resolveModule (../../.nvm/versions/node/v10.14.2/lib/node_modules/jest/node_modules/jest-resolve/build/index.js:221:17)
at Object.doMock (lib/search.spec.js:9:8)
● should throw
TypeError: search is not a function
305 | const error = new Error('myError')
306 | issues.mockRejectedValue(error)
> 307 | await expect(search()).rejects.toEqual(error)
| ^
308 | })
309 |
at Object.search (lib/search.spec.js:307:16)
When run without a project being passed, the module should prompt the user with an interactive selector. Inquirer.js seems to be the best option with our current stack.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
via npx
$ npx good-first-issue node
Unexpected token (
via npm global install
/Users/shayneboyer/.npm-packages/lib/node_modules/good-first-issue/bin/good-first-issue.js:21
.action(async (project, cmd) => {
^
SyntaxError: Unexpected token (
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
5.0.0
to 5.1.0
.This version is covered by your current version range and after updating it in your project the build failed.
strip-ansi is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
4.1.0
to 4.1.1
.This version is covered by your current version range and after updating it in your project the build failed.
commander is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
.action()
should include Promise for async ([#1157])The new version differs by 14 commits.
d5186ba
Bump version to 4.1.1
37e9428
Add 4.1.1 to CHANGELOG
e5f316f
Use npm ci
with CI (#1164)
cb54d5f
fix(ts): action can be an async function (#1157)
6791884
Merge branch 'master' into develop
f31d757
Add FUNDING file for enabling GitHub Sponsor on repo
d9627f5
Merge pull request #1147 from shadowspawn/feature/changelog-lint
32c26df
Use consistent list character in markdown
4092956
Merge branch 'master' into develop
82f5157
Fix diff order for 4.1 link
7a480a7
Add missing diff link for 4.1.0
e45ae5a
Merge pull request #1136 from shadowspawn/feature/update-examples
d97aaaa
Add missing diff link for 4.1.0
4922fb8
Update examples
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
We could add a start script in package.json which will run node bin/good-first-issue
follow parts of documentation:
To test locally, using the modules tests with npm test and trying out a few different commands (like the selector, a specific project, a failed project, and so on) is recommended. For example:
npm i -g # This assumes your current working directory is the module's directory
good-first-issue # run the interactive CLI
good-first-issue react # test the react project
good-first-issue node # test the Node.js project
good-first-issue github # test the GitHub organization, `github`
good-first-issue github/semantic # test the GitHub repo, `github/semantic`
good-first-issue thisisntarealprojectorgithuborg
If you run the code below, its install the repo in the path of the OS ( globally ), but don't install its dependencies, that is needed by test feature.
npm i -g #
I am working in improvement to the Doc in a separate fork.
Seems bigtestjs.io is inactively managing good-first-issues: bigtestjs/bigtestjs.io#3
Let's sit back for a moment and look back at how new project support is added.
data.json
npm run markdown
(Creates an Serial Number)data.json
and README.md
Now, what happens when you have multiple PRs? The serial number in README.md will cause conflicts and rebase
must be performed to avoid conflicts. This creates a friction while adding new projects.
README.md
gets updated automatically whenever projects.json
is updated (May be some bot).7.0.1
to 7.0.2
.This version is covered by your current version range and after updating it in your project the build failed.
open is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
7.0.4
to 7.0.5
.This version is covered by your current version range and after updating it in your project the build failed.
inquirer is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 4 commits.
65a4d59
Publish
e2099ed
Update dependencies
8270551
Produce error on prompt in non-tty environment. (#891)
6a883e6
Update lint-staged to the latest version 🚀 (#886)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
16.8.0
to 16.8.1
.This version is covered by your current version range and after updating it in your project the build failed.
@octokit/rest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 1 commits.
b4c38e2
fix: do not load the same plugin again
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
In testing #57, I noticed that 5 of the first 7 runs of the good-first-issue feeling-lucky
command were all repos with only a few issues and two of them were total spam issues created within the last day.
To help ensure that we're actually sending users to Good First Issues that they'll be able to make a meaningful contribution to, how do we feel about setting a filter for ⭐️s to 50?
If we want to ensure that there's still a way to pull from the full set of "Good First Issues" I'd not be opposed to adding an "All" command in the same release that the filter is shipped.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
Theoretically this module should be able to be require()
d. Exposing and passing the raw data we're creating shouldn't be too hard... right?
From #80 (comment):
If at this point we were to intercept an empty string literal from the response header rather than the results of a list, and this string literal was to be an error response in a short-circuit and no error was able to be parsed, edge of timeouts, parsing errors etc. This would still return as true, hence returning an empty string exposed.
It would be suitable at some point here validate the actual type integrity of the expected data formats being used, as side effects of this may lead to false positives.
Referring to bin/good-first-issue#32.
Currently we're just outputting the key for each project object in the project selector. You can see what we're currently doing here.
Ideally, we'd be outputting the project name a project description to select from.
kleur
is generally faster and smaller so we can replace chalk
.
We currently support including descriptions in projects.json
and consuming them (at least in the CLI – not entirely sure about the module), but don't currently have any descriptions.
Before we get a tremendous amount of projects, it would be incredible to get descriptions and require them when adding new ones so we don't have to do a bunch retroactively 👍
As of now, in order to add projects we do 2 things:
data/projects.json
README.md
Step-2 might get forgotten sometime. This can be automated stuff as part of npm script
.
We can have PROJECT_SUPPORTED.md
where we list all the projects.
we've set sort and order already in the module rather we can provide options to the cli+module
Option | type | default | description |
---|---|---|---|
first |
boolean | false | return the first/top result |
order |
enum [asc, desc] | asc | |
sort |
enum[comments, created, updated] | updated | |
open |
boolean | false | open the issue in browser |
16.16.5
to 16.17.0
.This version is covered by your current version range and after updating it in your project the build failed.
@octokit/rest is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 1 commits.
ca3ac5b
feat: octokit.licenses.listCommonlyUsed()
(#1268)
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Just tried validating #122 again and got a very different kind of error:
$ good-first-issue debugger.html
RequestError [HttpError]: Validation Failed
at /Users/cyren/GitHub/good-first-issue/node_modules/@octokit/request/dist-node/index.js:66:23
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async search (/Users/cyren/GitHub/good-first-issue/lib/search.js:18:20)
at async Command.<anonymous> (/Users/cyren/GitHub/good-first-issue/bin/good-first-issue.js:30:22) {
name: 'HttpError',
status: 422,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
'cache-control': 'no-cache',
connection: 'close',
'content-length': '306',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Sat, 03 Aug 2019 20:07:08 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
status: '422 Unprocessable Entity',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': 'FC8D:1808:23917AF:43744CB:5D45E96C',
'x-ratelimit-limit': '10',
'x-ratelimit-remaining': '9',
'x-ratelimit-reset': '1564862888',
'x-xss-protection': '1; mode=block'
},
request: {
method: 'GET',
url: 'https://api.github.com/search/issues?q=repo%3Adevtools-html%2Fdebugger.html%20is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22&sort=updated&order=desc&per_page=30&page=1',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit.js/16.28.5 Node.js/12.7.0 (macOS Mojave; x64)'
},
request: { hook: [Function: bound bound register], validate: [Object] }
},
errors: [
{
message: 'The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.',
resource: 'Search',
field: 'q',
code: 'invalid'
}
],
documentation_url: 'https://developer.github.com/v3/search/'
}
Browsing around, I noticed this piece of incomplete comment text.
Expects a ... passed
do not need to ...
We should store the project's data in projects.json
in spite of the projects.js
project descriptions thread follow up - #24 (comment)
Examples:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.