fix: suppression workflow Discord + deprecation doctrine controller_resolver
- Suppression .gitea/workflows/discord-notify.yml (plus de notification Discord a chaque push) - Suppression controller_resolver.auto_mapping deprecie dans les 2 fichiers doctrine.yaml Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
name: Discord Notification
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
runs_on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Send Discord Embed
|
||||
run: |
|
||||
REPO_NAME="${{ gitea.repository }}"
|
||||
BRANCH="${{ gitea.ref_name }}"
|
||||
AUTHOR="${{ gitea.actor }}"
|
||||
COMMIT_SHA="${{ gitea.sha }}"
|
||||
SHORT_SHA="${COMMIT_SHA:0:7}"
|
||||
COMMIT_URL="${{ gitea.server_url }}/${REPO_NAME}/commit/${COMMIT_SHA}"
|
||||
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
COMMIT_MSG=$(git log -1 --pretty=format:'%s' | head -c 200)
|
||||
FILES_CHANGED=$(git diff --stat HEAD~1 HEAD 2>/dev/null | tail -1 || echo "premier commit")
|
||||
FILE_COUNT=$(git diff --name-only HEAD~1 HEAD 2>/dev/null | wc -l || echo "0")
|
||||
FILES_LIST=$(git diff --name-only HEAD~1 HEAD 2>/dev/null | head -15 | sed 's/^/• /' || echo "• premier commit")
|
||||
|
||||
if [ "$FILE_COUNT" -gt 15 ]; then
|
||||
REMAINING=$((FILE_COUNT - 15))
|
||||
FILES_LIST=$(printf '%s\n... et %s autres fichiers' "$FILES_LIST" "$REMAINING")
|
||||
fi
|
||||
|
||||
# Escape for JSON
|
||||
COMMIT_MSG_ESC=$(echo "$COMMIT_MSG" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g')
|
||||
FILES_CHANGED_ESC=$(echo "$FILES_CHANGED" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g')
|
||||
FILES_LIST_ESC=$(echo "$FILES_LIST" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/\\/\\\\/g; s/"/\\"/g' | sed 's/\\\\\\\\/\\\\/g')
|
||||
|
||||
cat > /tmp/discord.json <<DEOF
|
||||
{
|
||||
"embeds": [{
|
||||
"title": "DEPOT CRM E-Cosplay",
|
||||
"description": "${COMMIT_MSG_ESC}",
|
||||
"url": "${COMMIT_URL}",
|
||||
"color": 16156748,
|
||||
"fields": [
|
||||
{"name": "Branche", "value": "\`${BRANCH}\`", "inline": true},
|
||||
{"name": "Commit", "value": "[\`${SHORT_SHA}\`](${COMMIT_URL})", "inline": true},
|
||||
{"name": "Auteur", "value": "${AUTHOR}", "inline": true},
|
||||
{"name": "Statistiques", "value": "\`\`\`${FILES_CHANGED_ESC}\`\`\`", "inline": false},
|
||||
{"name": "Fichiers modifies (${FILE_COUNT})", "value": "\`\`\`${FILES_LIST_ESC}\`\`\`", "inline": false},
|
||||
{"name": "Applications E-Cosplay", "value": "[CRM](https://crm.e-cosplay.fr) - Plateforme de gestion clients/revendeurs\\n[Signature](https://sign.e-cosplay.fr) - Signature electronique DocuSeal\\n[Paiement](https://payment.e-cosplay.fr) - Portail de paiement Stripe\\n[Status](https://status.e-cosplay.fr) - Page de status des services\\n[Stripe Connect](https://stripe.e-cosplay.fr) - Webhooks Stripe et redirection dashboard Connect", "inline": false}
|
||||
],
|
||||
"footer": {"text": "${REPO_NAME}"},
|
||||
"timestamp": "${TIMESTAMP}"
|
||||
}]
|
||||
}
|
||||
DEOF
|
||||
|
||||
curl -sf -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @/tmp/discord.json \
|
||||
"${{ secrets.DISCORD_WEBHOOK }}"
|
||||
@@ -20,8 +20,6 @@ doctrine:
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App
|
||||
controller_resolver:
|
||||
auto_mapping: false
|
||||
|
||||
when@test:
|
||||
doctrine:
|
||||
|
||||
@@ -24,8 +24,6 @@ doctrine:
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App
|
||||
controller_resolver:
|
||||
auto_mapping: false
|
||||
|
||||
when@test:
|
||||
doctrine:
|
||||
|
||||
Reference in New Issue
Block a user