Skip to content

Commit 4d92fc8

Browse files
config issues create and fix #86, Close #86
1 parent 9d45c6b commit 4d92fc8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,11 @@ jobs:
8282
8383
TITLE="[Qlty Smell] $RULE_ID em $FILE_URI"
8484
85-
EXISTING_ISSUES=$(gh issue list --search "$TITLE label:technical-debt is:open" --json number --jq '.[0].number' --repo ${{ github.repository }} || echo "")
8685
8786
if [ -n "$EXISTING_ISSUES" ]; then
8887
echo "Issue duplicada encontrada (#$EXISTING_ISSUES) para: $TITLE. Pulando criação."
8988
else
90-
91-
BODY="**Detalhes do Débito Técnico**\n\n- **Regra:** $RULE_ID\n- **Arquivo:** \`$FILE_URI\`\n- **Linha:** $LINE\n\n---\n**Mensagem do Qlty:** $MESSAGE\n\n\nCriado automaticamente pelo pipeline de CI."
89+
BODY="**Detalhes do Débito Técnico**"$'\n\n'"- **Regra:** $RULE_ID"$'\n'"- **Arquivo:** \`$FILE_URI\`"$'\n'"- **Linha:** $LINE"$'\n\n'"---"$'\n\n'"**Mensagem do Qlty:** $MESSAGE"$'\n\n'"Criado automaticamente pelo pipeline de CI."
9290
9391
gh issue create --title "$TITLE" --body "$BODY" --label "technical-debt" --repo ${{ github.repository }}
9492
echo "Issue criada para: $TITLE"

backend/src/utils/validationUser.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { z } from 'zod';
2-
import { userData } from '../controller/requestController';
2+
import { userData } from '../models/User';
33

44
const userSchema = z.object({
55
nomeCompleto: z.string().min(3, "Nome muito curto"),
@@ -11,5 +11,9 @@ const userSchema = z.object({
1111

1212

1313
export function userValidate(data: userData){
14-
const validation = userSchema.parse(data); // validação dos dados
14+
try{
15+
userSchema.parse(data); // validação dos dados
16+
}catch(error){
17+
throw error;
18+
}
1519
}

0 commit comments

Comments
 (0)