🐛 code-climate: Type error on new Code Climate projects
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')
👟 Reproduction steps
- Create a New Project in Code Climate.
- Get the repo-id from the url: codeclimate.com/repos/
repo-id/settings/test_reporter - Create a vanilla installation of new backstage architecture
- Follow the readme to add code-climate plugin
- Add annotation
codeclimate.com/repo-id: repo-idto example-website in entities.yaml using the repo-id found in step 2 - yarn dev
- Visit the entity page of example-website
- 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?
- [X] I have read the Code of Conduct
Are you willing to submit PR?
No, but I'm happy to collaborate on a PR with someone else
Contributions welcome for this 👍
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.