From ead3bd061f38c6717782087c59ec8b0d2e681afb Mon Sep 17 00:00:00 2001 From: Bassem Dghaidi Date: Mon, 29 Nov 2021 18:55:04 +0100 Subject: [PATCH] Link /add clickable urls (#14) * Fix repo_url value to reference github url * Add release history --- README.md | 3 +++ bin/starred_search | 8 ++++---- package.json | 2 +- src/main.js | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index eb39eec..947c1b5 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,9 @@ starred_search -u 'link-' -f 'es6' | jq 'map(.repo_name)' ## Release History +- 0.1.11 + - Fix repo_url value to reference the Repository's GitHub URL + - Default homepage_url to `N.A` - 0.1.10 - Add release workflow - Add [contributing guide](./CONTRIBUTING.md) diff --git a/bin/starred_search b/bin/starred_search index f4f4730..7142f83 100755 --- a/bin/starred_search +++ b/bin/starred_search @@ -10964,8 +10964,8 @@ const search = (options) => { return { repo_name: item.full_name, repo_description: item.description, - repo_url: item.html_url, - homepage: item.homepage, + repo_url: `https://github.com/${item.full_name}`, + homepage: item.homepage ? item.homepage : "N.A", repo_stars: item.stargazers_count, forks: item.forks } @@ -10997,7 +10997,7 @@ module.exports = eval("require")("debug"); /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"_args":[["axios@0.21.1","/home/runner/work/starred_search/starred_search"]],"_from":"axios@0.21.1","_id":"axios@0.21.1","_inBundle":false,"_integrity":"sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.1","name":"axios","escapedName":"axios","rawSpec":"0.21.1","saveSpec":null,"fetchSpec":"0.21.1"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.1.tgz","_spec":"0.21.1","_where":"/home/runner/work/starred_search/starred_search","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.10.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.1"}'); +module.exports = JSON.parse('{"name":"axios","version":"0.21.1","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test && bundlesize","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://github.com/axios/axios","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.10.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}'); /***/ }), @@ -11005,7 +11005,7 @@ module.exports = JSON.parse('{"_args":[["axios@0.21.1","/home/runner/work/starre /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"starred_search","version":"0.1.10","description":"Search your starred repositories on GitHub for a keyword.","main":"src/cli.js","scripts":{"test":"mocha","build":"ncc build src/cli.js -o bin && mv bin/index.js bin/starred_search"},"bin":{"@link-/starred_search":"bin/starred_search","starred_search":"bin/starred_search"},"repository":{"type":"git","url":"git+https://github.com/Link-/starred_search.git"},"bugs":{"url":"https://github.com/Link-/starred_search/issues"},"homepage":"https://github.com/Link-/starred_search/#readme","keywords":["GitHub","repository","fulltext search","starred","stargazers","cli","terminal","nodejs"],"author":"Link-","license":"ISC","dependencies":{"@vercel/ncc":"^0.28.4","arg":"^4.1.3","axios":"^0.21.1","cachedir":"^2.3.0","chalk":"^4.1.0","esm":"^3.2.25","flat-cache":"^2.0.1","imurmurhash":"^0.1.4","minisearch":"^3.0.2"},"devDependencies":{"prettier":"^2.2.1"}}'); +module.exports = JSON.parse('{"name":"starred_search","version":"0.1.11","description":"Search your starred repositories on GitHub for a keyword.","main":"src/cli.js","scripts":{"test":"mocha","build":"ncc build src/cli.js -o bin && mv bin/index.js bin/starred_search"},"bin":{"@link-/starred_search":"bin/starred_search","starred_search":"bin/starred_search"},"repository":{"type":"git","url":"git+https://github.com/Link-/starred_search.git"},"bugs":{"url":"https://github.com/Link-/starred_search/issues"},"homepage":"https://github.com/Link-/starred_search/#readme","keywords":["GitHub","repository","fulltext search","starred","stargazers","cli","terminal","nodejs"],"author":"Link-","license":"ISC","dependencies":{"@vercel/ncc":"^0.28.4","arg":"^4.1.3","axios":"^0.21.1","cachedir":"^2.3.0","chalk":"^4.1.0","esm":"^3.2.25","flat-cache":"^2.0.1","imurmurhash":"^0.1.4","minisearch":"^3.0.2"},"devDependencies":{"prettier":"^2.2.1"}}'); /***/ }), diff --git a/package.json b/package.json index 242c8af..e9a07cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "starred_search", - "version": "0.1.10", + "version": "0.1.11", "description": "Search your starred repositories on GitHub for a keyword.", "main": "src/cli.js", "scripts": { diff --git a/src/main.js b/src/main.js index 4b216dd..796bebd 100644 --- a/src/main.js +++ b/src/main.js @@ -163,8 +163,8 @@ const search = (options) => { return { repo_name: item.full_name, repo_description: item.description, - repo_url: item.html_url, - homepage: item.homepage, + repo_url: `https://github.com/${item.full_name}`, + homepage: item.homepage ? item.homepage : "N.A", repo_stars: item.stargazers_count, forks: item.forks }