spets 0.1.6 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1875,9 +1875,20 @@ async function githubCommand(options) {
1875
1875
  console.log(`Received command: ${parsed.command}`);
1876
1876
  let taskId = task;
1877
1877
  if (!taskId) {
1878
- const taskMatch = comment.match(/Task ID: `([^`]+)`/);
1879
- if (taskMatch) {
1880
- taskId = taskMatch[1];
1878
+ try {
1879
+ const issueNum = issue || pr;
1880
+ if (issueNum) {
1881
+ const commentsJson = execSync4(
1882
+ `gh api repos/${owner}/${repo}/issues/${issueNum}/comments --jq '.[].body'`,
1883
+ { encoding: "utf-8" }
1884
+ );
1885
+ const taskMatch = commentsJson.match(/Task ID: `([^`]+)`/);
1886
+ if (taskMatch) {
1887
+ taskId = taskMatch[1];
1888
+ console.log(`Found Task ID from Issue comments: ${taskId}`);
1889
+ }
1890
+ }
1891
+ } catch {
1881
1892
  }
1882
1893
  }
1883
1894
  if (!taskId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spets",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Spec Driven Development Execution Framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",