Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
version: 2
updates:
# GitHub Actions dependencies
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "chore"
prefix-development: "chore"
include: "scope"

# npm/JavaScript dependencies (if package.json exists)
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 10
versioning-strategy: increase
labels:
- "dependencies"
- "javascript"
commit-message:
prefix: "chore"
prefix-development: "chore"
include: "scope"
ignore:
# Ignore major version updates for now
- dependency-name: "*"
update-types: ["version-update:semver-major"]

# Python dependencies (if requirements.txt, setup.py, or pyproject.toml exists)
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "python"
commit-message:
prefix: "chore"
prefix-development: "chore"
include: "scope"
ignore:
# Ignore major version updates for now
- dependency-name: "*"
update-types: ["version-update:semver-major"]

# Docker dependencies (if Dockerfile exists)
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "docker"
commit-message:
prefix: "chore"
include: "scope"
Comment on lines +71 to +73
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message configuration for the Docker ecosystem is missing the "prefix-development" field, which is present in the GitHub Actions, npm, and pip configurations. This inconsistency could lead to different commit message formats for Docker dependency updates. For consistency, consider adding "prefix-development: 'chore'" to match the other ecosystem configurations.

Copilot uses AI. Check for mistakes.

# Go dependencies (if go.mod exists)
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "golang"
commit-message:
prefix: "chore"
include: "scope"
Comment on lines +86 to +88
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message configuration for the Go modules ecosystem is missing the "prefix-development" field, which is present in the GitHub Actions, npm, and pip configurations. This inconsistency could lead to different commit message formats for Go dependency updates. For consistency, consider adding "prefix-development: 'chore'" to match the other ecosystem configurations.

Copilot uses AI. Check for mistakes.
12 changes: 12 additions & 0 deletions .github/markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
}
],
"timeout": "20s",
"retryOn429": true,
"retryCount": 3,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206, 301, 302, 307, 308, 403, 429]
}
71 changes: 71 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
## 📋 Descrição

<!-- Descreva as mudanças feitas neste PR. Seja claro e objetivo. -->

### O que mudou?

<!-- Liste as principais alterações -->

### Por quê?

<!-- Explique a motivação para essas mudanças -->

## ✅ Checklist

<!-- Marque os itens aplicáveis com [x] -->

- [ ] O código segue os padrões do projeto
- [ ] Testes foram executados e estão passando
- [ ] Documentação foi atualizada (se aplicável)
- [ ] Commits seguem o padrão [Conventional Commits](https://www.conventionalcommits.org/pt-br/)
- [ ] Não há conflitos com a branch base
- [ ] Revisão própria do código foi realizada
- [ ] Comentários foram adicionados em áreas complexas (se necessário)

## 🔗 Issue Relacionada

<!-- Link para a issue relacionada. Se não houver, remova esta seção. -->

Closes #
Relates to #

## 🎯 Impacto Esperado

<!-- Descreva quais áreas do projeto são afetadas por essas mudanças -->

### Áreas Afetadas

- [ ] Documentação
- [ ] Automação/Scripts
- [ ] Templates
- [ ] CI/CD
- [ ] Configuração do Projeto
- [ ] Outro: ___________

### Impacto de Risco

- [ ] **Baixo** - Mudanças isoladas, sem impacto em funcionalidades existentes
- [ ] **Médio** - Alterações que podem afetar funcionalidades existentes
- [ ] **Alto** - Mudanças significativas que requerem atenção especial

## 📸 Capturas de Tela (se aplicável)

<!-- Adicione capturas de tela ou GIFs para demonstrar mudanças visuais -->

## 🧪 Como Testar

<!-- Descreva os passos para testar as mudanças -->

1.

Check failure on line 59 in .github/pull_request_template.md

View workflow job for this annotation

GitHub Actions / Lint Markdown Files

Trailing spaces

.github/pull_request_template.md:59:3 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md009.md
2.

Check failure on line 60 in .github/pull_request_template.md

View workflow job for this annotation

GitHub Actions / Lint Markdown Files

Trailing spaces

.github/pull_request_template.md:60:3 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md009.md
3.

Check failure on line 61 in .github/pull_request_template.md

View workflow job for this annotation

GitHub Actions / Lint Markdown Files

Trailing spaces

.github/pull_request_template.md:61:3 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md009.md

## 📝 Notas Adicionais

<!-- Qualquer informação adicional que os revisores devem saber -->

## 🔍 Revisores Sugeridos

<!-- @mencione revisores específicos, se houver -->

@
Copy link

Copilot AI Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR template includes an incomplete placeholder for suggested reviewers on line 71. The line contains only "@" which could cause confusion for contributors filling out the template. This should either be removed, replaced with a more complete example like "@reviewer-username", or include a comment explaining that this line should be deleted if no specific reviewer is needed.

Suggested change
@
@reviewer-username

Copilot uses AI. Check for mistakes.
141 changes: 141 additions & 0 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Auto Label PRs

on:
pull_request:
types: [opened, edited, reopened]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
auto-label:
name: Automatically Label Pull Requests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Auto-label based on PR content
uses: actions/github-script@v7
with:
script: |
const prTitle = context.payload.pull_request.title.toLowerCase();
const prBody = (context.payload.pull_request.body || '').toLowerCase();
const prContent = `${prTitle} ${prBody}`;

// Define label mapping with keywords
const labelMappings = {
'enhancement': ['feat', 'feature', 'add', 'implement', 'enhance', 'new'],
'bugfix': ['fix', 'bug', 'resolve', 'correct', 'patch', 'repair'],
'documentation': ['docs', 'documentation', 'readme', 'guide', 'comment'],
'refactor': ['refactor', 'cleanup', 'restructure', 'optimize', 'improve']
};

// Additional labels for special cases
const specialLabels = {
'dependencies': ['dependency', 'dependencies', 'dependabot', 'upgrade', 'update package'],
'ci': ['ci', 'workflow', 'github actions', 'pipeline', 'automation'],
'security': ['security', 'vulnerability', 'cve', 'exploit'],
'breaking-change': ['breaking change', 'breaking', 'major version']
};

// Combine all label mappings
const allMappings = { ...labelMappings, ...specialLabels };

const labelsToAdd = new Set();

// Check for matching keywords
for (const [label, keywords] of Object.entries(allMappings)) {
for (const keyword of keywords) {
if (prContent.includes(keyword)) {
labelsToAdd.add(label);
break;
}
}
}

// Convert Set to Array
const labels = Array.from(labelsToAdd);

// If no labels matched, add 'needs-triage'
if (labels.length === 0) {
labels.push('needs-triage');
}

// Get current labels
const currentLabels = context.payload.pull_request.labels.map(l => l.name);

// Only add labels that don't already exist
const newLabels = labels.filter(l => !currentLabels.includes(l));

if (newLabels.length > 0) {
console.log(`Adding labels: ${newLabels.join(', ')}`);

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: newLabels
});
} else {
console.log('No new labels to add');
}

- name: Add size label
uses: actions/github-script@v7
with:
script: |
// Get PR diff stats
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});

const additions = pr.data.additions;
const deletions = pr.data.deletions;
const totalChanges = additions + deletions;

let sizeLabel = '';

if (totalChanges < 10) {
sizeLabel = 'size/XS';
} else if (totalChanges < 50) {
sizeLabel = 'size/S';
} else if (totalChanges < 200) {
sizeLabel = 'size/M';
} else if (totalChanges < 500) {
sizeLabel = 'size/L';
} else {
sizeLabel = 'size/XL';
}

// Remove existing size labels
const currentLabels = context.payload.pull_request.labels;
const sizeLabelsToRemove = currentLabels
.filter(l => l.name.startsWith('size/'))
.map(l => l.name);

for (const label of sizeLabelsToRemove) {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
name: label
}).catch(() => {
// Ignore errors if label doesn't exist
});
}

// Add new size label
console.log(`Adding size label: ${sizeLabel} (${totalChanges} changes)`);

await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: [sizeLabel]
});
Loading
Loading