π code-climate: Type error on new Code Climate projects
MikeSamv opened this issue Β· comments
Mike Samvelian commented
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-id
to 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?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- 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
Andre Wanlin commented
Contributions welcome for this π