@kody-ade/kody-engine-lite 0.1.14 → 0.1.16
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/bin/cli.js +2 -2
- package/package.json +1 -1
- package/templates/kody.yml +11 -0
package/dist/bin/cli.js
CHANGED
|
@@ -1721,7 +1721,7 @@ function parseArgs() {
|
|
|
1721
1721
|
function findLatestTaskForIssue(issueNumber, projectDir) {
|
|
1722
1722
|
const tasksDir = path5.join(projectDir, ".tasks");
|
|
1723
1723
|
if (!fs6.existsSync(tasksDir)) return null;
|
|
1724
|
-
const allDirs = fs6.readdirSync(tasksDir).sort().reverse();
|
|
1724
|
+
const allDirs = fs6.readdirSync(tasksDir, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort().reverse();
|
|
1725
1725
|
const prefix = `${issueNumber}-`;
|
|
1726
1726
|
const direct = allDirs.find((d) => d.startsWith(prefix));
|
|
1727
1727
|
if (direct) return direct;
|
|
@@ -1742,7 +1742,7 @@ function findLatestTaskForIssue(issueNumber, projectDir) {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
} catch {
|
|
1744
1744
|
}
|
|
1745
|
-
return
|
|
1745
|
+
return null;
|
|
1746
1746
|
}
|
|
1747
1747
|
function generateTaskId() {
|
|
1748
1748
|
const now = /* @__PURE__ */ new Date();
|
package/package.json
CHANGED
package/templates/kody.yml
CHANGED
|
@@ -174,6 +174,17 @@ jobs:
|
|
|
174
174
|
persist-credentials: true
|
|
175
175
|
token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
|
|
176
176
|
|
|
177
|
+
- name: Checkout PR branch (for fix/rerun on PRs)
|
|
178
|
+
if: github.event.issue.pull_request && (needs.parse.outputs.mode == 'fix' || needs.parse.outputs.mode == 'rerun')
|
|
179
|
+
env:
|
|
180
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
|
|
181
|
+
run: |
|
|
182
|
+
PR_NUM="${{ github.event.issue.number }}"
|
|
183
|
+
PR_BRANCH=$(gh pr view "$PR_NUM" --json headRefName -q '.headRefName')
|
|
184
|
+
echo "Checking out PR branch: $PR_BRANCH"
|
|
185
|
+
git checkout "$PR_BRANCH"
|
|
186
|
+
git pull origin "$PR_BRANCH"
|
|
187
|
+
|
|
177
188
|
- uses: pnpm/action-setup@v4
|
|
178
189
|
with:
|
|
179
190
|
version: latest
|