linear-github-cli 1.1.2 → 1.1.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/dist/commands/create-sub.js +8 -12
- package/dist/github-client.js +3 -3
- package/package.json +1 -1
|
@@ -67,18 +67,6 @@ async function createSubIssue() {
|
|
|
67
67
|
});
|
|
68
68
|
console.log(`✅ Sub-Issue #${subIssue.number} created: ${subIssue.url}`);
|
|
69
69
|
console.log(` Parent: #${parentIssueNumber}`);
|
|
70
|
-
// Set GitHub Project date fields if dates are provided
|
|
71
|
-
if (details.dueDate || details.startDate) {
|
|
72
|
-
console.log('\n📅 Setting GitHub Project date fields...');
|
|
73
|
-
// sub-issueから直接プロジェクト情報を取得(Auto-add sub-issues to projectが有効な場合)
|
|
74
|
-
const projectName = await githubClient.getIssueProject(repo, subIssue.id);
|
|
75
|
-
if (projectName) {
|
|
76
|
-
await githubClient.setProjectDateFields(repo, projectName, subIssue.id, details.dueDate || undefined, details.startDate || undefined);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
console.log(' ⚠️ Sub-issue has no GitHub Project. Skipping date field setting.');
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
70
|
// Step 5: Wait for Linear sync, then update metadata
|
|
83
71
|
console.log('\n⏳ Waiting for Linear sync (5 seconds)...');
|
|
84
72
|
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
@@ -138,6 +126,14 @@ async function createSubIssue() {
|
|
|
138
126
|
console.log(` Due date: ${details.dueDate}`);
|
|
139
127
|
}
|
|
140
128
|
console.log(' Status: Will be updated automatically via PR integration');
|
|
129
|
+
// Set GitHub Project date fields if parent project is available and dates are provided
|
|
130
|
+
if (parentProjectName && (details.dueDate || details.startDate)) {
|
|
131
|
+
console.log('\n📅 Setting GitHub Project date fields...');
|
|
132
|
+
// Wait additional time for GitHub Actions to sync project assignment
|
|
133
|
+
console.log(' ⏳ Waiting for GitHub Actions sync (3 seconds)...');
|
|
134
|
+
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
135
|
+
await githubClient.setProjectDateFields(repo, parentProjectName, subIssue.id, details.dueDate || undefined, details.startDate || undefined);
|
|
136
|
+
}
|
|
141
137
|
}
|
|
142
138
|
else {
|
|
143
139
|
console.log('⚠️ Failed to update Linear issue metadata. You can update it manually in Linear.');
|
package/dist/github-client.js
CHANGED
|
@@ -534,14 +534,14 @@ class GitHubClientWrapper {
|
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
/**
|
|
537
|
-
* Get GitHub Project name from issue
|
|
537
|
+
* Get GitHub Project name from issue number
|
|
538
538
|
*/
|
|
539
|
-
async getIssueProject(repo,
|
|
539
|
+
async getIssueProject(repo, issueNumber) {
|
|
540
540
|
try {
|
|
541
541
|
const [owner, name] = repo.split('/');
|
|
542
542
|
const query = `query {
|
|
543
543
|
repository(owner: "${owner}", name: "${name}") {
|
|
544
|
-
issue(
|
|
544
|
+
issue(number: ${issueNumber}) {
|
|
545
545
|
projectItems(first: 10) {
|
|
546
546
|
nodes {
|
|
547
547
|
project {
|