guild-agents 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  /**
2
- * github.js — Integración con GitHub CLI (gh)
2
+ * github.js — GitHub CLI (gh) integration
3
3
  *
4
- * Requiere que el usuario tenga gh instalado y autenticado.
5
- * Todas las operaciones son no-bloqueantessi gh no está disponible,
6
- * Guild funciona normalmente sin integración GitHub.
4
+ * Requires the user to have gh installed and authenticated.
5
+ * All operations are non-blockingif gh is not available,
6
+ * Guild works normally without GitHub integration.
7
7
  *
8
8
  * Uses execFileSync with array-based arguments to prevent shell injection
9
9
  * through user-controlled strings (issue titles, bodies, labels).
@@ -12,16 +12,16 @@
12
12
  import { execFileSync } from 'node:child_process';
13
13
 
14
14
  const LABELS = [
15
- { name: 'backlog', color: '8E8E8E', description: 'Tarea documentada, pendiente de iniciar' },
16
- { name: 'in-progress', color: '0075CA', description: 'En implementación' },
17
- { name: 'in-review', color: 'E4A800', description: 'En validación QA' },
18
- { name: 'done', color: '2EA44F', description: 'Completada y mergeada' },
19
- { name: 'bug', color: 'D73A4A', description: 'Bug reportado por QA' },
20
- { name: 'blocked', color: 'E99695', description: 'Bloqueada por dependencia' },
15
+ { name: 'backlog', color: '8E8E8E', description: 'Documented task, pending start' },
16
+ { name: 'in-progress', color: '0075CA', description: 'In implementation' },
17
+ { name: 'in-review', color: 'E4A800', description: 'In QA validation' },
18
+ { name: 'done', color: '2EA44F', description: 'Completed and merged' },
19
+ { name: 'bug', color: 'D73A4A', description: 'Bug reported by QA' },
20
+ { name: 'blocked', color: 'E99695', description: 'Blocked by dependency' },
21
21
  ];
22
22
 
23
23
  /**
24
- * Verifica si gh CLI está instalado y autenticado.
24
+ * Checks if gh CLI is installed and authenticated.
25
25
  */
26
26
  export function isGhAvailable() {
27
27
  try {
@@ -33,11 +33,11 @@ export function isGhAvailable() {
33
33
  }
34
34
 
35
35
  /**
36
- * Configura los labels de estado en el repositorio GitHub.
36
+ * Configures status labels in the GitHub repository.
37
37
  */
38
38
  export async function setupGithubLabels(repoUrl) {
39
39
  if (!isGhAvailable()) {
40
- console.warn('gh CLI no disponiblesaltando configuración de labels.');
40
+ console.warn('gh CLI not availableskipping label configuration.');
41
41
  return;
42
42
  }
43
43
 
@@ -54,13 +54,13 @@ export async function setupGithubLabels(repoUrl) {
54
54
  '--force',
55
55
  ], { stdio: 'ignore' });
56
56
  } catch {
57
- // Label ya existe o error no crítico
57
+ // Label already exists or non-critical error
58
58
  }
59
59
  }
60
60
  }
61
61
 
62
62
  /**
63
- * Asigna un issue a @me y cambia su label de estado.
63
+ * Assigns an issue to @me and changes its status label.
64
64
  */
65
65
  export function assignIssue(issueNumber, fromLabel, toLabel) {
66
66
  if (!isGhAvailable()) return;
@@ -80,7 +80,7 @@ export function assignIssue(issueNumber, fromLabel, toLabel) {
80
80
  }
81
81
 
82
82
  /**
83
- * Agrega un comentario a un issue.
83
+ * Adds a comment to an issue.
84
84
  */
85
85
  export function commentIssue(issueNumber, body) {
86
86
  if (!isGhAvailable()) return;
@@ -95,7 +95,7 @@ export function commentIssue(issueNumber, body) {
95
95
  }
96
96
 
97
97
  /**
98
- * Cierra un issue con un comentario.
98
+ * Closes an issue with a comment.
99
99
  */
100
100
  export function closeIssue(issueNumber, comment) {
101
101
  if (!isGhAvailable()) return;
@@ -110,7 +110,7 @@ export function closeIssue(issueNumber, comment) {
110
110
  }
111
111
 
112
112
  /**
113
- * Crea un issue de bug referenciando una tarea padre.
113
+ * Creates a bug issue referencing a parent task.
114
114
  */
115
115
  export function createBugIssue(title, body, parentIssueNumber) {
116
116
  if (!isGhAvailable()) return null;
@@ -126,7 +126,7 @@ export function createBugIssue(title, body, parentIssueNumber) {
126
126
  const issueNumber = issueUrl.split('/').pop();
127
127
 
128
128
  if (parentIssueNumber) {
129
- commentIssue(parentIssueNumber, `Bug encontrado: ${issueUrl}`);
129
+ commentIssue(parentIssueNumber, `Bug found: ${issueUrl}`);
130
130
  }
131
131
 
132
132
  return { number: issueNumber, url: issueUrl };
@@ -136,7 +136,7 @@ export function createBugIssue(title, body, parentIssueNumber) {
136
136
  }
137
137
 
138
138
  /**
139
- * Extrae "owner/repo" de una URL de GitHub.
139
+ * Extracts "owner/repo" from a GitHub URL.
140
140
  */
141
141
  function extractRepoFromUrl(url) {
142
142
  const match = url.match(/github\.com[/:]([^/]+\/[^/]+?)(?:\.git)?$/);