linear-github-cli 1.3.2 → 1.3.4

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.
package/README.md CHANGED
@@ -94,9 +94,9 @@ lg parent
94
94
 
95
95
  Follow the interactive prompts:
96
96
  1. Select repository from dropdown
97
- 2. Enter issue title
97
+ 2. Enter issue title (required)
98
98
  3. Enter description (opens in editor)
99
- 4. Optionally set due date (YYYY-MM-DD)
99
+ 4. Set due date (YYYY-MM-DD, required)
100
100
  5. Select GitHub labels (checkboxes). Choices: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `research`
101
101
  6. Optionally select GitHub project
102
102
  7. Optionally select Linear project (after sync)
@@ -112,9 +112,9 @@ lg sub
112
112
  Follow the interactive prompts:
113
113
  1. Select repository from dropdown
114
114
  2. Select parent issue from list
115
- 3. Enter sub-issue title
115
+ 3. Enter sub-issue title (required)
116
116
  4. Enter description (opens in editor)
117
- 5. Optionally set due date (YYYY-MM-DD)
117
+ 5. Set due date (YYYY-MM-DD, required)
118
118
  6. Select GitHub labels (same predefined list as above)
119
119
  7. Optionally select Linear project (after sync)
120
120
 
@@ -132,7 +132,7 @@ lg create-sub --help
132
132
  - ✅ **Project autocomplete**: Select GitHub and Linear projects from dropdowns
133
133
  - ✅ **Parent issue selection**: Browse and select parent issues when creating sub-issues
134
134
  - ✅ **GitHub label sync**: Multi-select from the seven standard labels (feat, fix, chore, docs, refactor, test, research); selections are mirrored to matching Linear team labels
135
- - ✅ **Due date input**: Optional date picker with validation
135
+ - ✅ **Due date input**: Required date picker with validation
136
136
  - ✅ **Automatic Linear sync**: Waits for Linear sync and updates metadata (due date, project, labels)
137
137
  - ✅ **Parent-child relationships**: Automatically links sub-issues to parent issues
138
138
  - ✅ **Status automation**: Issues start in Linear backlog; rely on the Linear × GitHub PR automation for status changes
@@ -6,6 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.InputHandler = void 0;
7
7
  const child_process_1 = require("child_process");
8
8
  const inquirer_1 = __importDefault(require("inquirer"));
9
+ const isValidDateYmd = (input) => {
10
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(input))
11
+ return false;
12
+ const [year, month, day] = input.split('-').map(Number);
13
+ const date = new Date(Date.UTC(year, month - 1, day));
14
+ return (date.getUTCFullYear() === year &&
15
+ date.getUTCMonth() === month - 1 &&
16
+ date.getUTCDate() === day);
17
+ };
9
18
  class InputHandler {
10
19
  linearClient;
11
20
  githubClient;
@@ -150,7 +159,7 @@ class InputHandler {
150
159
  {
151
160
  type: 'input',
152
161
  name: 'title',
153
- message: 'Issue title:',
162
+ message: 'Issue title (required):',
154
163
  validate: (input) => input.length > 0 || 'Title is required',
155
164
  },
156
165
  {
@@ -169,19 +178,17 @@ class InputHandler {
169
178
  validate: (input) => {
170
179
  if (!input)
171
180
  return true; // Optional
172
- const date = new Date(input);
173
- return !isNaN(date.getTime()) || 'Invalid date format';
181
+ return isValidDateYmd(input) || 'Invalid date format';
174
182
  },
175
183
  },
176
184
  {
177
185
  type: 'input',
178
186
  name: 'dueDate',
179
- message: 'Due date (YYYY-MM-DD):',
187
+ message: 'Due date (YYYY-MM-DD, required):',
180
188
  validate: (input) => {
181
189
  if (!input)
182
- return true; // Optional
183
- const date = new Date(input);
184
- return !isNaN(date.getTime()) || 'Invalid date format';
190
+ return 'Due date is required';
191
+ return isValidDateYmd(input) || 'Invalid date format';
185
192
  },
186
193
  },
187
194
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-github-cli",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "CLI tool for creating GitHub issues with Linear integration",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {