lighthouse-check-action icon indicating copy to clipboard operation
lighthouse-check-action copied to clipboard

Running on multiple urls outputs a comment with bad formatting

Open SeeringPhil opened this issue 2 years ago • 1 comments

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/[email protected]
        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

SeeringPhil avatar Sep 06 '23 16:09 SeeringPhil

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.

stale[bot] avatar Oct 15 '23 12:10 stale[bot]

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.

adamhenson avatar May 03 '24 17:05 adamhenson