foo-software / lighthouse-check-action

GitHub Action for running @GoogleChromeLabs Lighthouse audits with all the bells and whistles 🔔 Multiple audits, Slack notifications, and more!
https://github.com/marketplace/actions/lighthouse-check
MIT License
471 stars 24 forks source link

Running on multiple urls outputs a comment with bad formatting #122

Closed SeeringPhil closed 2 months ago

SeeringPhil commented 10 months ago

Describe the bug When running with multiple urls set, the comment that is added to the PR is not formatted properly for urls that add a subpath ('baseUrl/subPath')

Instead of filling the value in the 'URL' column, it adds a row and puts the information in the 'device' column.

Capture d’écran, le 2023-09-06 à 12 06 05

To Reproduce

- name: Lighthouse Check
        uses: foo-software/lighthouse-check-action@v10.0.0
        with:
          gitAuthor: ${{ github.actor }}
          gitBranch: ${{ github.ref }}
          gitHubAccessToken: ${{ secrets.GITHUB_TOKEN }}
          prCommentEnabled: true
          prCommentSaveOld: true
          device: all
          outputDirectory: ${{ github.workspace }}/tmp/artifacts
          urls: |
            ${{steps.firebase_hosting_preview.outputs.details_url}},
            ${{steps.firebase_hosting_preview.outputs.details_url}}/inventaire-neuf,
            ${{steps.firebase_hosting_preview.outputs.details_url}}/en/new-inventory
          sha: ${{ github.sha }}

Expected behavior I would expect that the table is filled in the correct columns.

Additional context N/A

Also, I think this can cause really big comments for no real gain. Maybe there could be a parameter added that would switch the formatting to a 'compactComments' that would use the tables to the fullest and output something like this?

Device URL Accessibility Best practices Performance PWA SEO
mobile baseUrl 95 90 95 80 100
desktop baseUrl 90 90 95 80 100
mobile baseUrl/subPath1 92 90 95 80 100
desktop baseUrl/subPath1 92 90 95 80 100
stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

adamhenson commented 2 months ago

Closing in favor of somewhat duplicated https://github.com/foo-software/lighthouse-check-action/issues/123. Honestly I just haven't had time to implement this. PRs welcomed.