AlexSim93 / pull-request-analytics-action

Provides informative reports on team and developer metrics, based on data from pull requests and code reviews
MIT License
110 stars 10 forks source link

Cannot read properties of null (reading 'login'): '`review.user` is null' problem #35

Closed vergil-zhao closed 7 months ago

vergil-zhao commented 7 months ago

Describe the bug I tried to fetch all PRs in the repo to generate the report, then it returned errors like below. Not sure which PR made this error, a guess is that the deleted user (ghost) created PR may be the culprit like in #5.

Expected behavior A clear and concise description of what you expected to happen.

Configuration

name: PR Analytics
on:
  workflow_dispatch:
    inputs:
      report_date_start:
        description: "Report date start(d/MM/yyyy)"
        required: false
      report_date_end:
        description: "Report date end(d/MM/yyyy)"
        required: false

jobs:
  create-report:
    name: "Create report"
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: read
      issues: write
    steps:
      - name: "Run script for analytics"
        uses: AlexSim93/pull-request-analytics-action@v2
        with:
          GITHUB_TOKEN: ${{ secrets.TOKEN }}
          GITHUB_REPO_FOR_ISSUE: "***"
          GITHUB_OWNER_FOR_ISSUE: "***"
          GITHUB_OWNERS_REPOS: "***/***"
          CORE_HOURS_START: "9:00"
          CORE_HOURS_END: "18:00"
          TIMEZONE: "Asia/Shanghai"
          REPORT_DATE_START: ${{ inputs.report_date_start }}
          REPORT_DATE_END: ${{ inputs.report_date_end }}

Screenshots

PR_Analytics_·_Zennioptical_customer-data-platform_7ecbc3a
AlexSim93 commented 7 months ago

Thanks for reporting! I have fixed this error, so now it should work correctly.

vergil-zhao commented 7 months ago

Thanks for the rapid fix! I've tried again and it worked very well!