4 min leitura • Guide 493 of 877
Automação de Workflow GitLab
As capacidades de CI/CD do GitLab combinadas com a gestão de projetos do GitScrum criam workflows automatizados poderosos. A integração GitLab do GitScrum conecta merge requests, status de pipeline e issues aos seus boards de projeto, permitindo atualizações automáticas de status e workflows de desenvolvimento seamless.
Integração GitLab + GitScrum
| Feature GitLab | Sync GitScrum |
|---|---|
| Merge Requests | Vinculados a tarefas, updates de status |
| Commits | Aparecem na timeline da tarefa |
| Pipelines | Status visível, triggers de automação |
| Branches | Auto-vincula a tarefas via naming |
| Code Review | Comentários visíveis em contexto |
Configurando Integração
SETUP DE INTEGRAÇÃO GITLAB
1. GERAR TOKEN GITLAB
┌─────────────────────────────────────────────────┐
│ GitLab → Settings → Access Tokens │
│ │
│ Nome token: gitscrum-integration │
│ Scopes: api, read_repository │
│ Expiração: Configure apropriadamente │
└─────────────────────────────────────────────────┘
2. CONFIGURAR GITSCRUM
┌─────────────────────────────────────────────────┐
│ GitScrum → Settings → Integrations → GitLab │
│ │
│ GitLab URL: https://gitlab.com (ou self-hosted)│
│ Token: [colar token] │
│ Verificar conexão │
└─────────────────────────────────────────────────┘
3. CONFIGURAR WEBHOOKS
┌─────────────────────────────────────────────────┐
│ GitLab → Project → Settings → Webhooks │
│ │
│ URL: [GitScrum webhook URL] │
│ Secret: [Secret gerado] │
│ Triggers: │
│ ☑ Push events │
│ ☑ Merge request events │
│ ☑ Pipeline events │
│ ☑ Comments │
└─────────────────────────────────────────────────┘
Automação de Workflow
REGRAS DE WORKFLOW AUTOMATIZADO
REGRA 1: MR Criado → Tarefa Em Review
┌─────────────────────────────────────────────────┐
│ Trigger: Merge Request aberto │
│ Condição: Título MR contém GS-XXX │
│ Ação: │
│ • Vincular MR à tarefa GS-XXX │
│ • Atualizar status → Em Review │
│ • Notificar reviewers │
└─────────────────────────────────────────────────┘
REGRA 2: Pipeline Sucesso → Pronto para Merge
┌─────────────────────────────────────────────────┐
│ Trigger: Pipeline completou com sucesso │
│ Condição: MR vinculado a tarefa GitScrum │
│ Ação: │
│ • Adicionar label "pipeline-passed" │
│ • Atualizar tarefa → Pronto para Merge │
└─────────────────────────────────────────────────┘
REGRA 3: Pipeline Falhou → Sinalizar Tarefa
┌─────────────────────────────────────────────────┐
│ Trigger: Pipeline falhou │
│ Ação: │
│ • Adicionar label "pipeline-failed" │
│ • Manter status Em Progresso │
│ • Notificar assignee │
└─────────────────────────────────────────────────┘
REGRA 4: MR Mergeado → Tarefa Done
┌─────────────────────────────────────────────────┐
│ Trigger: Merge Request mergeado │
│ Ação: │
│ • Atualizar tarefa → Done │
│ • Registrar tempo de conclusão │
│ • Fechar MR relacionado │
└─────────────────────────────────────────────────┘
Timeline da Tarefa com GitLab
VIEW UNIFICADA DA TAREFA
┌─────────────────────────────────────────────────┐
│ Tarefa: GS-456 - Implementar dashboard usuário │
│ Status: Em Review │
│ │
│ TIMELINE DE ATIVIDADE: │
│ ───────────────────────────────────────────── │
│ │
│ Hoje │
│ ├── 10:30 AM Pipeline passou ✓ │
│ │ !87 pipeline #1234 │
│ │ │
│ ├── 10:15 AM Commit pushed │
│ │ "Fix review comments" │
│ │ abc123 by @developer │
│ │ │
│ ├── 9:45 AM Review solicitado │
│ │ !87 para @senior-dev │
│ │ │
│ Ontem │
│ ├── 4:30 PM MR aberta │
│ │ !87 "GS-456: User dashboard" │
│ │ │
│ ├── 2:00 PM Commit pushed │
│ │ "Add dashboard components" │
│ └───────────────────────────────────────── │
└─────────────────────────────────────────────────┘