Skip to content

Commit 9f558f1

Browse files
Merge pull request #2 from DiogoRibeiro7/test/todo-action-issue-creation
test: add sample TODO to trigger issue creation via GitHub Action
2 parents acf5d0f + daeb24e commit 9f558f1

File tree

4 files changed

+118
-98
lines changed

4 files changed

+118
-98
lines changed

.github/workflows/todo.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Smart TODO Check
33
on:
44
push:
55
branches: [main]
6-
pull_request:
7-
branches: [main]
86

97
jobs:
108
smart-todo:
@@ -23,4 +21,4 @@ jobs:
2321
- name: Run Smart TODO Action
2422
uses: ./
2523
with:
26-
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
repo-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

ROADMAP.md

Lines changed: 98 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,157 +1,168 @@
1-
# 🗺️ Roadmap - Projeto `smart-todo-action`
1+
# 🗺️ Roadmap `smart-todo-action`
22

3-
Um GitHub Action inteligente para rastrear, classificar e transformar TODOs do seu código em issues inteligentes e contextualizadas.
3+
A smart GitHub Action that detects, classifies, and transforms inline TODOs in your codebase into actionable GitHub Issues — with semantic analysis and integration with task management systems.
44

55
---
66

7-
## 🧱 Fase 1: Fundações e Paridade com Projeto Original
7+
## 🧱 Phase 1: Foundations & Core Features
88

9-
> Recriação da funcionalidade básica com código limpo, modular e testável.
9+
> Rebuild the original functionality with clean, modular, and testable code.
1010
11-
- [ ] Estrutura inicial do projeto (`src/`, `core/`, `parser/`, etc.)
12-
- [ ] Parser de TODOs/FIXME/BUG com suporte multi-linguagem
13-
- [ ] Sistema de tarefas inicial: integração com GitHub Issues
14-
- [ ] Templates configuráveis para issues
15-
- [ ] Configuração como GitHub Action (`action.yml`, workflow exemplo)
16-
- [ ] Testes unitários com Jest/Vitest
11+
- [X] Project structure and folder setup (`src/`, `core/`, `parser/`, etc.)
12+
- [X] TODO/FIXME/BUG parser with multi-language support
13+
- [ ] Initial task system: GitHub Issues integration
14+
- [ ] Configurable issue templates
15+
- [ ] GitHub Action integration (`action.yml`, workflow example)
16+
- [ ] Unit tests with Vitest or Jest
1717

1818
---
1919

20-
## 🧠 Fase 2: Inteligência e Semântica
20+
## 🧠 Phase 2: Intelligence & Semantics
2121

22-
> Adição de inteligência artificial e compreensão semântica aos TODOs.
22+
> Bring context-awareness and automation through LLMs and structured tags.
2323
24-
- [ ] Classificação automática (`bug`, `refactor`, `enhancement`, etc.)
25-
- [ ] Geração automática de títulos e descrições via LLM
26-
- [ ] Extração de `due date` e `priority` do texto dos TODOs
27-
- [ ] Suporte a tags especiais (`@assignee`, `#module`, etc.)
24+
- [ ] Automatic classification (`bug`, `refactor`, `enhancement`, etc.)
25+
- [ ] LLM-powered title/description generation
26+
_e.g., `Review sort algorithm``Optimize Sorting Algorithm for Edge Cases`_
27+
- [ ] Parse structured metadata: `priority`, `due`, etc.
28+
_e.g., `TODO(priority=high, due=2025-06-01): improve this logic`_
29+
- [ ] Support for structured tags (`@assignee`, `#module`, etc.)
2830

2931
---
3032

31-
## 🌍 Fase 3: Suporte Estendido
33+
## 🌍 Phase 3: Extended Support
3234

33-
> Tornar o projeto mais flexível, aplicável e adaptável a diferentes realidades.
35+
> Make the system flexible, extensible, and applicable to diverse environments.
3436
35-
- [ ] Integração com outros task managers (Jira, Notion, Linear, Trello)
36-
- [ ] Internacionalização (detecção multilíngue de TODOs)
37-
- [ ] Suporte a arquivos `.ipynb`, `.yaml`, `.json`, `.xml`, etc.
37+
- [ ] Multi-platform task integration (GitHub, Jira, Notion, Trello, Linear)
38+
- [ ] Internationalization (i18n): multilingual TODO detection
39+
- [ ] File format support: `.ipynb`, `.yaml`, `.json`, `.xml`, etc.
3840

3941
---
4042

41-
## 📊 Fase 4: Análise e Relatórios
43+
## 📊 Phase 4: Insights & Reporting
4244

43-
> Adicionar insights e visualizações sobre o uso e evolução dos TODOs.
45+
> Provide visibility into the evolution and structure of tracked TODOs.
4446
45-
- [ ] Geração de dashboard (markdown/HTML) com métricas
46-
- [ ] Agrupamento por pasta, prioridade, autor (`git blame`)
47-
- [ ] Histórico de mudanças nos TODOs
48-
- [ ] Notificações de TODOs próximos da data (`due date`)
47+
- [ ] Markdown/HTML dashboard with summary statistics
48+
_Total TODOs, grouped by folder, priority, author (`git blame`)_
49+
- [ ] TODO history tracking (added/removed/modified)
50+
- [ ] Due date notifications or PR comments
4951

5052
---
5153

52-
## 🔁 Fase 5: Otimizações e Distribuição
54+
## 🔁 Phase 5: Optimization & Distribution
5355

54-
> Melhorias finais para performance, manutenção e distribuição.
56+
> Final touches to ensure performance, scalability, and community usability.
5557
56-
- [ ] Arquitetura modular e plugável
57-
- [ ] CLI standalone (fora do GitHub Actions)
58-
- [ ] >90% de cobertura de testes
59-
- [ ] Documentação completa
60-
- [ ] Publicação oficial no GitHub Marketplace
58+
- [ ] Plugin-based architecture
59+
- [ ] CLI support (standalone usage outside GitHub Actions)
60+
- [ ] >90% test coverage
61+
- [ ] Full documentation with usage examples
62+
- [ ] Publish to GitHub Marketplace
6163

6264
---
6365

64-
# 🚀 Roadmap para TODO Issue Tracker 2.0
66+
## 📌 Notes
6567

66-
Este projeto tem como objetivo construir uma GitHub Action inteligente para rastrear, classificar e transformar TODOs do seu código em issues contextualizadas, com suporte a análise semântica e integração com múltiplas plataformas.
68+
- Clean architecture and modularity are core principles from day one.
69+
- LLM functionality will be optional and clearly separated from core logic.
70+
- Built with automation, extensibility, and developer workflows in mind.
6771

6872
---
6973

70-
## 🧱 Fase 1: Fundações e Paridade com o Projeto Original
74+
# 🚀 Roadmap for TODO Issue Tracker 2.0
7175

72-
🎯 Objetivo: Recriar a funcionalidade original com código limpo, modular e testável.
76+
This project aims to build an intelligent GitHub Action that scans your codebase for TODOs, classifies them, and transforms them into contextualized GitHub Issues — with semantic analysis and multi-platform integration.
7377

74-
- [ ] Criar estrutura base do projeto
75-
- Pasta `src/` para código-fonte
76-
- Subpastas: `core/`, `parser/`, `tasks/`, `templates/`, etc.
78+
---
79+
80+
## 🧱 Phase 1: Foundations and Parity with the Original Project
81+
82+
🎯 Goal: Recreate the original functionality with clean, modular, and testable code.
7783

78-
- [ ] Implementar parser de TODOs
79-
- Detectar comentários `TODO`, `FIXME`, `BUG`, etc.
80-
- Suporte a múltiplas linguagens (`.js`, `.ts`, `.py`, `.go`, etc.)
84+
- [ ] Create the base project structure
85+
- `src/` folder for source code
86+
- Subfolders: `core/`, `parser/`, `tasks/`, `templates/`, etc.
8187

82-
- [ ] Sistema de tarefas inicial: GitHub Issues
83-
- Criar, atualizar e remover issues com base nos TODOs encontrados
88+
- [ ] Implement TODO parser
89+
- Detect `TODO`, `FIXME`, `BUG`, etc. comments
90+
- Support for multiple languages (`.js`, `.ts`, `.py`, `.go`, etc.)
8491

85-
- [ ] Sistema de templates para criação de issues
86-
- Títulos e descrições personalizáveis via templates
92+
- [ ] Initial task system: GitHub Issues
93+
- Create, update, and remove issues based on detected TODOs
8794

88-
- [ ] Workflow GitHub Action funcional
89-
- Arquivo `action.yml`
90-
- Exemplo de uso em `.github/workflows/todo.yml`
95+
- [ ] Templating system for issue creation
96+
- Customizable titles and descriptions via templates
9197

92-
- [ ] Testes unitários com Jest ou Vitest
98+
- [ ] Functional GitHub Action workflow
99+
- `action.yml` definition file
100+
- Example usage in `.github/workflows/todo.yml`
101+
102+
- [ ] Unit testing with Jest or Vitest
93103

94104
---
95105

96-
## 🧠 Fase 2: Inteligência e Semântica
106+
## 🧠 Phase 2: Intelligence and Semantics
97107

98-
🎯 Objetivo: Tornar o sistema mais inteligente, aproveitando LLMs e contexto semântico.
108+
🎯 Goal: Make the system smarter by leveraging LLMs and contextual awareness.
99109

100-
- [ ] Classificação automática de TODOs
101-
- Usar LLMs ou regras heurísticas para classificar como `bug`, `enhancement`, `refactor`, etc.
110+
- [ ] Automatic TODO classification
111+
- Use LLMs or heuristics to classify as `bug`, `enhancement`, `refactor`, etc.
102112

103-
- [ ] Geração de título e descrição automática via LLM
104-
- Exemplo: `Revisar algoritmo de ordenação``Optimize Sorting Algorithm for Edge Cases`
113+
- [ ] Auto-generate issue titles and descriptions using LLMs
114+
_Example: `Review sorting algorithm``Optimize Sorting Algorithm for Edge Cases`_
105115

106-
- [ ] Extração de `due date` e `priority` via parsing
107-
- Exemplo: `TODO(priority=high, due=2025-06-01): melhorar isso`
116+
- [ ] Extract `due date` and `priority` via inline metadata parsing
117+
_Example: `TODO(priority=high, due=2025-06-01): improve this logic`_
108118

109119
---
110120

111-
## 🌍 Fase 3: Suporte Estendido
121+
## 🌍 Phase 3: Extended Support
112122

113-
🎯 Objetivo: Tornar o sistema flexível e útil para ambientes diversos.
123+
🎯 Goal: Make the project adaptable to diverse environments and workflows.
114124

115-
- [ ] Suporte a múltiplos sistemas de tarefas
116-
- GitHub, Jira, Notion, Trello, Linear (via APIs)
125+
- [ ] Support for multiple task management platforms
126+
_GitHub, Jira, Notion, Trello, Linear (via APIs)_
117127

118-
- [ ] Internacionalização (i18n)
119-
- Detecção automática de TODOs em diversas línguas
128+
- [ ] Internationalization (i18n)
129+
_Detect TODOs written in different languages_
120130

121-
- [ ] Suporte a mais formatos de arquivos
122-
- `.ipynb`, `.yaml`, `.md`, `.json`, `.xml`, entre outros
131+
- [ ] Support for additional file types
132+
_`.ipynb`, `.yaml`, `.md`, `.json`, `.xml`, and more_
123133

124134
---
125135

126-
## 📊 Fase 4: Análise e Relatórios
136+
## 📊 Phase 4: Analysis and Reporting
127137

128-
🎯 Objetivo: Dar visibilidade sobre o estado e evolução dos TODOs.
138+
🎯 Goal: Provide visibility into the state and evolution of TODOs.
129139

130-
- [ ] Dashboard em Markdown ou HTML
131-
- Total de TODOs
132-
- Agrupamento por pasta, prioridade, autor (via `git blame`)
140+
- [ ] Markdown/HTML dashboard with metrics
141+
_Total TODOs, grouped by folder, priority, author (`git blame`)_
133142

134-
- [ ] Histórico de TODOs
135-
- Rastrear adições e remoções ao longo do tempo
143+
- [ ] TODO history tracking
144+
_Track when TODOs are added, removed, or changed over time_
136145

137-
- [ ] Notificações e lembretes
138-
- Comentários automáticos em PRs/issues ao se aproximar a `due date`
146+
- [ ] Notifications and reminders
147+
_Comment on PRs or issues when due dates are approaching_
139148

140149
---
141150

142-
## 🔁 Fase 5: Otimizações e Contribuições
151+
## 🔁 Phase 5: Optimizations and Contributions
143152

144-
🎯 Objetivo: Garantir qualidade e facilitar manutenção.
153+
🎯 Goal: Ensure quality, performance, and ease of collaboration.
145154

146-
- [ ] Arquitetura com módulos plugáveis
147-
- [ ] Cobertura de testes superior a 90%
148-
- [ ] Suporte a CLI standalone (fora do GitHub Actions)
149-
- [ ] Documentação completa com exemplos de uso
150-
- [ ] Publicação como GitHub Action oficial no Marketplace
155+
- [ ] Plugin-based modular architecture
156+
- [ ] CLI support (standalone usage outside GitHub Actions)
157+
- [ ] Test coverage >90%
158+
- [ ] Full documentation with usage examples
159+
- [ ] Publish to GitHub Marketplace as an official Action
151160

152161
---
153162

154-
## 📌 Observações
163+
## 📌 Notes
164+
165+
- Modularity, testability, and code clarity are priorities from day one.
166+
- LLM integration will be optional and cleanly decoupled from core logic.
167+
- Designed with automation, extensibility, and developer experience in mind.
155168

156-
- Modularidade, testes e clareza são prioridades desde o início
157-
- Integração com LLMs será opcional e desacoplada do core

src/ActionMain.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,27 @@ async function run(): Promise<void> {
1010
const workspace = process.env.GITHUB_WORKSPACE || '.';
1111

1212
const todos: TodoItem[] = extractTodosFromDir(workspace);
13+
const octokit = github.getOctokit(token);
14+
const { owner, repo } = github.context.repo;
1315

14-
core.info(`🔍 Encontrados ${todos.length} TODOs no repositório`);
16+
core.info(`🔍 Found ${todos.length} TODOs`);
1517

1618
for (const todo of todos) {
17-
core.info(`📌 [${todo.tag}] ${todo.text} (${todo.file}:${todo.line})`);
18-
}
19+
const title = `[${todo.tag}] ${todo.text}`;
20+
const body = `Found in \`${todo.file}:${todo.line}\`\n\n\`\`\`\n${todo.text}\n\`\`\``;
1921

20-
const octokit = github.getOctokit(token);
21-
const { owner, repo } = github.context.repo;
22+
await octokit.rest.issues.create({
23+
owner,
24+
repo,
25+
title,
26+
body
27+
});
2228

23-
// No futuro: criar/atualizar issues aqui
29+
core.info(`✅ Created issue: ${title}`);
30+
}
2431

25-
core.info(`Contexto: ${owner}/${repo}`);
2632
} catch (error: any) {
27-
core.setFailed(`Erro na execução: ${error.message}`);
33+
core.setFailed(`Action failed: ${error.message}`);
2834
}
2935
}
3036

src/testTodo.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// src/testTodo.ts
2+
// TODO: Refactor this logic to improve performance
3+
export function testLogic() {
4+
return Math.random();
5+
}

0 commit comments

Comments
 (0)