backstage / community-plugins

Community plugins for Backstage
Apache License 2.0
132 stars 130 forks source link

🔌 Plugin: codecov #218

Open mlukasik-branch opened 1 year ago

mlukasik-branch commented 1 year ago

🔖 Summary

Dedicated widget inside software catalog entity view showing actual code coverage pulled from codecov.io

🌐 Project website (if applicable)

https://app.codecov.io/

✌️ Context

Simplest solution I propose is to:

  1. pull latest average coverage from codecov API using URL

API request:

GET https://codecov.io/api/v2/{service}/{owner_username}/repos/{repo_name}/coverage/?interval=30d&start_date={today}

sample response:

{ "count": 1, "next": null, "previous": null, "results": [ { "timestamp": "2023-04-02T00:00:00Z", "min": 60.93796, "max": 60.93796, "avg": 60.93796 } ], "total_pages": 1 }

  1. On entity widget present following essential data: latest avg, timestamp, link to codecov dashboard (for details)

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

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

benjdlambert commented 1 year ago

Sure think this sounds good! Do you want to throw together a PR for something? :pray: Think that this could be it's own frontend plugin that provides a Widget or a Card for integrators to use?

mlukasik-branch commented 1 year ago

Happy to make it happen.

this week I want to release its first version inside my company, next week collect feedback and then decide how to release it to our dear open source community.

also want to clarify with my company if they are interested releasing it under their brand (still open source naturally).

jadametz commented 11 months ago

@mlukasik-branch Are you still working on this? This is something we'd love to take advantage of!

mlukasik-branch commented 11 months ago

plugin has already been deployed and tested as part of my company internal backstage instance.

covered software catalog use caes by dedicated widget (gauge card)

  1. ability to see latest minimum code coverage value coimng from codecov.io on entity overview page

Screenshot 2023-09-26 at 7 10 48 PM

Screenshot 2023-09-26 at 7 10 53 PM

  1. ability to see meaningful message if coverage data cannot be found inside codecov.io

Screenshot 2023-09-26 at 7 12 20 PM

3 ability to display menaingful error message if something goes wrong during data fetching from codecov.io

I will try to release its code to community this week for now without compatibility with newest backstage backend syste (released with backstage v1.18)

freben commented 4 months ago

ping @mlukasik-branch :) moving this to the community plugins repo now which is a great home for contributions

github-actions[bot] commented 1 day ago

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.