flowwer-dev / pull-request-stats

Github action to print relevant stats about Pull Request reviewers
MIT License
366 stars 79 forks source link

Cannot read property '0' of null #3

Closed robin-wayve closed 3 years ago

robin-wayve commented 3 years ago

I tried out the minimal config from the README on a private repository in an organisation and the action fails with this output:

Error: Cannot read property '0' of null

I tried this both @master and @v2.0.0 with the same result.

Full log ``` 2021-04-16T10:34:26.3292395Z ##[section]Starting: Request a runner to run this job 2021-04-16T10:34:27.0628947Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest' 2021-04-16T10:34:27.0629208Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest' 2021-04-16T10:34:27.0629439Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest' 2021-04-16T10:34:27.1952907Z ##[section]Finishing: Request a runner to run this job 2021-04-16T10:34:34.4388757Z Current runner version: '2.277.1' 2021-04-16T10:34:34.4419724Z ##[group]Operating System 2021-04-16T10:34:34.4420691Z Ubuntu 2021-04-16T10:34:34.4421220Z 20.04.2 2021-04-16T10:34:34.4421648Z LTS 2021-04-16T10:34:34.4422169Z ##[endgroup] 2021-04-16T10:34:34.4422777Z ##[group]Virtual Environment 2021-04-16T10:34:34.4423628Z Environment: ubuntu-20.04 2021-04-16T10:34:34.4424426Z Version: 20210412.1 2021-04-16T10:34:34.4425448Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20210412.1/images/linux/Ubuntu2004-README.md 2021-04-16T10:34:34.4426926Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20210412.1 2021-04-16T10:34:34.4427828Z ##[endgroup] 2021-04-16T10:34:34.4429910Z ##[group]GITHUB_TOKEN Permissions 2021-04-16T10:34:34.4431400Z Actions: write 2021-04-16T10:34:34.4431921Z Checks: write 2021-04-16T10:34:34.4432526Z Contents: write 2021-04-16T10:34:34.4433257Z Deployments: write 2021-04-16T10:34:34.4434183Z Issues: write 2021-04-16T10:34:34.4434764Z Metadata: read 2021-04-16T10:34:34.4435283Z Packages: write 2021-04-16T10:34:34.4435919Z PullRequests: write 2021-04-16T10:34:34.4436737Z RepositoryProjects: write 2021-04-16T10:34:34.4437417Z SecurityEvents: write 2021-04-16T10:34:34.4437958Z Statuses: write 2021-04-16T10:34:34.4438634Z ##[endgroup] 2021-04-16T10:34:34.4441982Z Prepare workflow directory 2021-04-16T10:34:34.5211851Z Prepare all required actions 2021-04-16T10:34:34.5223552Z Getting action download info 2021-04-16T10:34:34.9737428Z Download action repository 'flowwer-dev/pull-request-stats@v2.0.0' 2021-04-16T10:34:37.1376039Z ##[group]Run flowwer-dev/pull-request-stats@v2.0.0 2021-04-16T10:34:37.1377073Z with: 2021-04-16T10:34:37.1377996Z token: *** 2021-04-16T10:34:37.1378621Z period: 30 2021-04-16T10:34:37.1379115Z charts: false 2021-04-16T10:34:37.1379583Z sort-by: REVIEWS 2021-04-16T10:34:37.1380172Z disable-links: false 2021-04-16T10:34:37.1380669Z ##[endgroup] 2021-04-16T10:34:43.8101642Z ##[error]Cannot read property '0' of null 2021-04-16T10:34:43.9540679Z Cleaning up orphan processes ```
manuelmhtr commented 3 years ago

Hi @robin-wayve thanks for reporting the problem. Please let me find the cause and send a solution soon.

robin-wayve commented 3 years ago

If I can provide any more context please let me know :bow:

manuelmhtr commented 3 years ago

@robin-wayve I think I found the problem. The avatar URIs for bots are different from the ones for users; I guess you have some bot doing pull requests in your repo and that caused the problem.

Could you please try running the action using the dev branch instead of master?

Let me know if that works and I'll clean everything to launch a 2.0.1 version.

robin-wayve commented 3 years ago

That worked, thanks for the fast turnaround! :bow:

manuelmhtr commented 3 years ago

@robin-wayve No problem. Thanks for your help!

It's now fixed in v2.0.1. You can switch back to master.