@ghuser/github-contribs
Advanced tools
Comparing version 2.2.1 to 2.2.2
18
index.js
@@ -152,6 +152,6 @@ 'use strict'; | ||
const hotIssuesHtmlToRepos = html => { | ||
const bigHtmlToRepos = (html, type) => { // type: 'issues' or 'pulls' | ||
const repos = new Set(); | ||
const regex = /<a.*href="\/(.*)\/(.*)\/issues\//g; | ||
const regex = new RegExp(`<a.*href="/(.*)/(.*)/${type}/`, 'g'); | ||
let linkToIssue; | ||
@@ -214,7 +214,7 @@ while ((linkToIssue = regex.exec(html))) { | ||
const userPRs = await fetchRetry( | ||
`https://github.com/users/${user}/created_pull_requests?from=${currDateStr}&to=${currDateStr}`, | ||
const userPRsAndHotIssues = await fetchRetry( | ||
`https://github.com/${user}?from=${currDateStr}`, | ||
); | ||
const userPRsHtml = await userPRs.text(); | ||
const prsRepos = issuesHtmlToRepos(userPRsHtml); | ||
const userPRsAndHotIssuesHtml = await userPRsAndHotIssues.text(); | ||
const prsRepos = bigHtmlToRepos(userPRsAndHotIssuesHtml, 'pull'); | ||
@@ -230,7 +230,3 @@ let issuesRepos = []; | ||
const userHotIssues = await fetchRetry( | ||
`https://github.com/${user}?from=${currDateStr}`, | ||
); | ||
const userHotIssuesHtml = await userHotIssues.text(); | ||
hotIssuesRepos = hotIssuesHtmlToRepos(userHotIssuesHtml); | ||
hotIssuesRepos = bigHtmlToRepos(userPRsAndHotIssuesHtml, 'issues'); | ||
} | ||
@@ -237,0 +233,0 @@ |
{ | ||
"name": "@ghuser/github-contribs", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "List all GitHub repos a user has contributed to since the beginning of time.", | ||
@@ -76,4 +76,4 @@ "license": "Unlicense", | ||
"check-coverage": true, | ||
"lines": 83 | ||
"lines": 75 | ||
} | ||
} |
[![Build Status](https://travis-ci.org/ghuser-io/github-contribs.svg?branch=master)](https://travis-ci.org/ghuser-io/github-contribs) | ||
[![Coverage Status](https://codecov.io/gh/ghuser-io/github-contribs/branch/master/graph/badge.svg)](https://codecov.io/gh/ghuser-io/github-contribs) | ||
[![npm version](https://rawgit.com/ghuser-io/github-contribs/master/thirdparty/badges/npm.svg)](https://www.npmjs.com/package/@ghuser/github-contribs) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors) | ||
[![npm version](https://cdn.jsdelivr.net/gh/ghuser-io/github-contribs@b301e71d69531b0edf1befd1f865a70ced557014/thirdparty/badges/npm.svg)](https://www.npmjs.com/package/@ghuser/github-contribs) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors) | ||
[<img src="https://rawgit.com/ghuser-io/github-contribs/master/thirdparty/octicons/repo.svg" align="left" width="64" height="64">](https://github.com/ghuser-io/github-contribs) | ||
[<img src="https://cdn.jsdelivr.net/gh/ghuser-io/github-contribs@b301e71d69531b0edf1befd1f865a70ced557014/thirdparty/octicons/repo.svg" align="left" width="64" height="64">](https://github.com/ghuser-io/github-contribs) | ||
@@ -53,4 +53,4 @@ # github-contribs | ||
<!-- prettier-ignore --> | ||
| [<img src="https://avatars1.githubusercontent.com/u/11795312?v=4" width="100px;"/><br /><sub><b>Aurelien Lourot</b></sub>](https://ghuser.io/AurelienLourot)<br />[💬](#question-AurelienLourot "Answering Questions") [💻](https://github.com/ghuser-io/github-contribs/commits?author=AurelienLourot "Code") [📖](https://github.com/ghuser-io/github-contribs/commits?author=AurelienLourot "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/15092?v=4" width="100px;"/><br /><sub><b>John Vandenberg</b></sub>](https://jayvdb.github.io/)<br />[🐛](https://github.com/ghuser-io/github-contribs/issues?q=author%3Ajayvdb "Bug reports") [🤔](#ideas-jayvdb "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/1057635?v=4" width="100px;"/><br /><sub><b>Jeaye Wilkerson</b></sub>](https://jeaye.com)<br />[🐛](https://github.com/ghuser-io/github-contribs/issues?q=author%3Ajeaye "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/18241007?v=4" width="100px;"/><br /><sub><b>Hagar Shilo</b></sub>](http://mandala.hagarsh.com)<br />[🤔](#ideas-strayblues "Ideas, Planning, & Feedback") | | ||
| :---: | :---: | :---: | :---: | | ||
| [<img src="https://avatars1.githubusercontent.com/u/11795312?v=4" width="100px;"/><br /><sub><b>Aurelien Lourot</b></sub>](https://ghuser.io/AurelienLourot)<br />[💬](#question-AurelienLourot "Answering Questions") [💻](https://github.com/ghuser-io/github-contribs/commits?author=AurelienLourot "Code") [📖](https://github.com/ghuser-io/github-contribs/commits?author=AurelienLourot "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/15092?v=4" width="100px;"/><br /><sub><b>John Vandenberg</b></sub>](https://jayvdb.github.io/)<br />[🐛](https://github.com/ghuser-io/github-contribs/issues?q=author%3Ajayvdb "Bug reports") [🤔](#ideas-jayvdb "Ideas, Planning, & Feedback") | [<img src="https://avatars1.githubusercontent.com/u/1057635?v=4" width="100px;"/><br /><sub><b>Jeaye Wilkerson</b></sub>](https://jeaye.com)<br />[🐛](https://github.com/ghuser-io/github-contribs/issues?q=author%3Ajeaye "Bug reports") | [<img src="https://avatars1.githubusercontent.com/u/18241007?v=4" width="100px;"/><br /><sub><b>Hagar Shilo</b></sub>](http://mandala.hagarsh.com)<br />[🤔](#ideas-strayblues "Ideas, Planning, & Feedback") | [<img src="https://avatars2.githubusercontent.com/u/1005638?v=4" width="100px;"/><br /><sub><b>Romuald Brillout</b></sub>](https://twitter.com/brillout)<br />[🤔](#ideas-brillout "Ideas, Planning, & Feedback") | | ||
| :---: | :---: | :---: | :---: | :---: | | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
@@ -76,3 +76,2 @@ | ||
* https://github.com/users/AurelienLourot/created_repositories?from=2018-05-17&to=2018-05-17 | ||
* https://github.com/users/AurelienLourot/created_pull_requests?from=2018-05-17&to=2018-05-17 | ||
* https://github.com/users/AurelienLourot/created_pull_request_reviews?from=2018-05-17&to=2018-05-17 | ||
@@ -83,17 +82,27 @@ * https://github.com/users/AurelienLourot/created_issues?from=2018-07-10&to=2018-07-10 | ||
> **NOTE**: it seems like `created_issues` URLs don't deliver "hot issues" (issues which received | ||
> more comments than others): | ||
> **NOTES**: | ||
> | ||
> ```bash | ||
> $ curl -s "https://github.com/users/AurelienLourot/created_issues?from=2015-09-23&to=2015-09-23" | ||
> <div class="profile-rollup-content"> | ||
> </div> | ||
> ``` | ||
> * It seems like `created_issues` URLs don't deliver "hot issues" (issues which received | ||
> more comments than others): | ||
> | ||
> To get these, we also query the profile itself: | ||
> ```bash | ||
> $ curl -s "https://github.com/users/AurelienLourot/created_issues?from=2015-09-23&to=2015-09-23" | ||
> <div class="profile-rollup-content"> | ||
> </div> | ||
> ``` | ||
> | ||
> ```bash | ||
> $ curl -s "https://github.com/AurelienLourot?from=2015-09-23" | grep issues/ | ||
> <a class="text-gray-dark" href="/jfrog/build-info/issues/60">Publish properties aren't used by build-info-extractor-gradle?</a> | ||
> ``` | ||
> To get these, we also query the profile itself: | ||
> | ||
> ```bash | ||
> $ curl -s "https://github.com/AurelienLourot?from=2015-09-23" | grep issues/ | ||
> <a class="text-gray-dark" href="/jfrog/build-info/issues/60">Publish properties aren't used by build-info-extractor-gradle?</a> | ||
> ``` | ||
> | ||
> * In the past we used to get the pull requests from a `created_pull_requests` URL but this got | ||
> removed. We now get the pull requests from the profile itself as well: | ||
> | ||
> ```bash | ||
> $ curl -s "https://github.com/AurelienLourot?from=2017-08-28" | grep pull/ | ||
> <a href="/tt-gf/ant-ivy/pull/2" class="content-title no-underline"> | ||
> ``` | ||
@@ -126,2 +135,6 @@ ### Why is it so slow? | ||
**2.2.2** (2018-10-13): | ||
* [ghuser-io/ghuser.io#172](https://github.com/ghuser-io/ghuser.io/issues/172) Fix after GitHub's | ||
interface has changed. The `created_pull_requests` "endpoint" is gone. | ||
**2.2.1** (2018-09-15): | ||
@@ -128,0 +141,0 @@ * Documentation improvements. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21510
164
291