ministryofjustice / operations-engineering

This repository is home to the Operations Engineering's tools and utilities for managing, monitoring, and optimising software development processes at the Ministry of Justice. • This repository is defined and managed in Terraform
https://user-guide.operations-engineering.service.justice.gov.uk/
MIT License
12 stars 5 forks source link

Investigate badges for compliant repos #528

Closed AntonyBishop closed 2 years ago

AntonyBishop commented 2 years ago

Background

Proposed user journey

Approach

Questions / Assumptions

Acceptance Criteria

Reference

How to write good user stories

NickWalt01 commented 2 years ago

https://dev.to/envoy_/150-badges-for-github-pnk

NickWalt01 commented 2 years ago

static badges

https://img.shields.io/badge/MoJ%20GH%20Standards%20Compliant%3F-Yes-green

https://img.shields.io/badge/MoJ%20GH%20Standards%20Compliant%3F-No-red

NickWalt01 commented 2 years ago

Long list of badges: https://naereen.github.io/badges/

NickWalt01 commented 2 years ago

Badge generator: https://michaelcurrin.github.io/badge-generator/#/data

NickWalt01 commented 2 years ago

repo standards badge

NickWalt01 commented 2 years ago

Add this code to a README.md repo, replace the repo name ![repo standards badge](https://img.shields.io/badge/dynamic/json?color=blue&label=MoJ%20Organisation%20GH%20Repository%20Standards%20Compliant&query=%24.data%5B%3F%28%40.name%20%3D%3D%20%22<repo_name>%22%29%5D.status&url=https%3A%2F%2Foperations-engineering-reports.cloud-platform.service.justice.gov.uk%2Fgithub_repositories)

NickWalt01 commented 2 years ago

The above command will query the operations eng report to get the pass/fail status of the named repo

NickWalt01 commented 2 years ago

There are further options and styles can apply here: https://shields.io/

NickWalt01 commented 2 years ago

[![repo standards badge](https://img.shields.io/badge/dynamic/json?color=blue&label=MoJ%20Organisation%20GH%20Repository%20Standards%20Compliant&query=%24.data%5B%3F%28%40.name%20%3D%3D%20%22<repo_name>%22%29%5D.status&url=https%3A%2F%2Foperations-engineering-reports.cloud-platform.service.justice.gov.uk%2Fgithub_repositories)](https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories#<repo_name> "Link to report")

NickWalt01 commented 2 years ago

The code above now is a html link to the report when a user clicks on the badge

NickWalt01 commented 2 years ago

repo standards badge

NickWalt01 commented 2 years ago

To make the right side pass, fail and show different colour requires a service written in Javascript as seen here: https://github.com/badges/shields/tree/master/services/

NickWalt01 commented 2 years ago

[![repo standards badge](https://img.shields.io/badge/dynamic/json?color=blue&style=for-the-badge&logo=github&label=MoJ%20Compliant&query=%24.data%5B%3F%28%40.name%20%3D%3D%20%22operations-engineering%22%29%5D.status&url=https%3A%2F%2Foperations-engineering-reports.cloud-platform.service.justice.gov.uk%2Fgithub_repositories)](https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories#operations-engineering "Link to report")