community-plugins icon indicating copy to clipboard operation
community-plugins copied to clipboard

🐛 code-climate: Type error on new Code Climate projects

Open MikeSamv opened this issue 1 year ago • 1 comments

Plugin Name

code-climate

📜 Description

An error occurs when a new project in Code Climate does not have test report data for the latest default branch. The plugin attempts to access this non-existent data, resulting in the "null is not an object" error in the frontend.

👍 Expected behavior

The frontend should display that test coverage has not been setup yet like Code Climate does.

👎 Actual Behavior with Screenshots

The Code Climate EntityCodeClimateCard component shows an error that says:

Error: null is not an object (evaluating 'Z.relationships.latest_default_branch_test_report.data.id')

image

👟 Reproduction steps

  1. Create a New Project in Code Climate.
  2. Get the repo-id from the url: codeclimate.com/repos/repo-id/settings/test_reporter
  3. Create a vanilla installation of new backstage architecture
  4. Follow the readme to add code-climate plugin
  5. Add annotation codeclimate.com/repo-id: repo-id to example-website in entities.yaml using the repo-id found in step 2
  6. yarn dev
  7. Visit the entity page of example-website
  8. Observe error displayed on the Code Climate card

📃 Provide the context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

MikeSamv avatar Jun 20 '24 17:06 MikeSamv

Contributions welcome for this 👍

awanlin avatar Jul 02 '24 14:07 awanlin

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.

github-actions[bot] avatar Sep 28 '24 12:09 github-actions[bot]