Skip to content

Commit

Permalink
Update: Modify generated README to handle private repositories
Browse files Browse the repository at this point in the history
The README's for generated projects would now be able to handle
cases where the project is private — badges would be hidden or
modified based on this

Signed-off-by: notsatan <git@notsatan.me>
  • Loading branch information
notsatan committed Jan 5, 2024
1 parent a2a2fd5 commit 69c7c68
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion {{ cookiecutter.project_name.strip() }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
{% if cookiecutter.github_specific_features.lower() == 'y' -%}
<div align="center">

{% if cookiecutter.private_project.lower() == "n" -%}
[![Build Status](https://img.shields.io/github/checks-status/{{ cookiecutter.go_module_path.strip('/').replace('github.com/', '') }}/{{ cookiecutter.base_branch.strip() }}?color=black&style=for-the-badge&logo=github)][github-actions]
{% endif -%}
{% if cookiecutter.use_codecov.lower() == 'y' -%}
[![Code Coverage](https://img.shields.io/codecov/c/{{ cookiecutter.go_module_path.strip('/').replace('.com', '') }}?color=blue&logo=codecov&style=for-the-badge)][github-actions-tests]
{% endif -%}
[![Security: GoSec](https://img.shields.io/badge/Security-GoSec-lightgrey?style=for-the-badge&logo=springsecurity)](https://github.com/securego/gosec)
[![Dependencies Status](https://img.shields.io/badge/Dependencies-Up%20to%20Date-brightgreen?style=for-the-badge&logo=dependabot)][dependabot-pulls]
[![Semantic Versioning](https://img.shields.io/badge/versioning-semantic-black?style=for-the-badge&logo=semver)][github-releases]
[![Pre-Commit Enabled](https://img.shields.io/badge/Pre--Commit-Enabled-blue?style=for-the-badge&logo=pre-commit)][precommit-config]
[![License](https://img.shields.io/github/license/{{ cookiecutter.go_module_path.strip('/').replace('github.com/', '') }}?color=red&style=for-the-badge)][project-license]
{% if cookiecutter.private_project.lower() == "n" -%}
[![License](https://img.shields.io/github/license/{{ cookiecutter.go_module_path.strip('/').replace('github.com/', '') }}?color=red&style=for-the-badge&logo=unlicense)][project-license]
{% else -%}
[![License](https://img.shields.io/badge/License-{{ cookiecutter.license.replace('-', '--').replace('Software License ', '').replace(' ', '%20') }}-lightgrey?color=red&style=for-the-badge&logo=unlicense)][project-license]
{% endif -%}
[![Go v{{ cookiecutter.go_version }}](https://img.shields.io/badge/Go-%20v{{ cookiecutter.go_version }}-black?style=for-the-badge&logo=go)][gomod-file]

{{ cookiecutter.project_description }}
Expand Down

0 comments on commit 69c7c68

Please sign in to comment.