backstage / community-plugins

Community plugins for Backstage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› code-climate: Type error on new Code Climate projects

MikeSamv opened this issue Β· 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?

  • 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

Contributions welcome for this πŸ‘