Aggiunto controllo scrittura bglug #363

Merged
paspo merged 4 commits from amreo/bglug.it:ci-controllo-convenzione-nomi into main 2025-02-04 20:32:32 +00:00
3 changed files with 42 additions and 0 deletions
Showing only changes of commit cba1d86cbf - Show all commits

View File

@ -0,0 +1,27 @@
#!/usr/bin/sed -Ef
s/bglug.it/%censored%/g
s/facebook.com\/bglug/%censored%/g
s/listinfo\/bglug/%censored%/g
s/lists.linux.it\/pipermail\/bglug/%censored%/g
s/src=".*bglug.*"/%censored%/g
s/href=".*bglug.*"/%censored%/g
s/https:\/\/edu.meet.garr.it\/bglug/%censored%/g
s/slug: .*bglug.*/%censored%/g
s/<link>.*bglug.*<\/link>/%censored%/g
s/container_name: bglug/%censored%/g
s/:\s*image: .*bglug.*/%censored%/g
s/\[.*\]\(.*bglug.*\)/%censored%/g
s/docker run .*bglug.*/%censored%/g
s/docker build .*bglug.*/%censored%/g
s/^README.md:.*bglug.*/%censored%/g
s/https:\/\/bglug.us12.list-manage.com/%censored%/g
s/https:\/\/bglug.herokuapp.com/%censored%/g
s/http:\/\/bglug.herokuapp.com/%censored%/g
s/:(\s+-\s+)(\/)([0-9]+)(\/)([0-9]+)(\/)([0-9]+)(\/).*bglug.*/%censored%/g
s/.*.svg:.*/%censored%/g
s/http:\/\/bglugvs.web3king.com/%censored%/g
s/:(\s+-\s+)(\/)evento(\/).*bglug.*/%censored%/g
s/from bglug import Evento/%censored%/g
s/http:\/\/bglug.uservoice.com/%censored%/g
s/mailto\:bglug@/%censored%/g

View File

@ -0,0 +1,13 @@
#!/bin/bash
RED='\033[0;31m'
NC='\033[0m' # No Color
OUTPUT=$(grep --binary-files=text -rE "bglug" * | .gitea/workflows/check_bglug.sed | grep -ie '.*:.*bglug.*' | grep -v BgLUG)
COUNT=$(echo "${OUTPUT}" | wc -l)
if [ "$COUNT" -gt "0" ]; then
echo -e "${RED}BgLUG non è stato scritto correttamente: si scrive BgLUG!${NC}"
echo "${OUTPUT}"
exit 1
else
exit 0
fi

View File

@ -23,3 +23,5 @@ jobs:
- name: check for unwanted unicode runes - name: check for unwanted unicode runes
run: | run: |
bash .gitea/workflows/unwanted_unicode_pr.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} bash .gitea/workflows/unwanted_unicode_pr.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
- name: check if bglug is written wrong
run: .gitea/workflows/check_bglug_convention.sh