@jonit-dev/night-watch-cli 1.8.10-beta.5 → 1.8.10-beta.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.
- package/dist/cli.js +29 -1
- package/dist/commands/dashboard/tab-config.d.ts.map +1 -1
- package/dist/commands/dashboard/tab-config.js +1 -0
- package/dist/commands/dashboard/tab-config.js.map +1 -1
- package/dist/commands/shared/env-builder.d.ts.map +1 -1
- package/dist/commands/shared/env-builder.js +1 -0
- package/dist/commands/shared/env-builder.js.map +1 -1
- package/dist/scripts/night-watch-cron.sh +338 -50
- package/dist/scripts/night-watch-helpers.sh +117 -0
- package/dist/scripts/night-watch-merger-cron.sh +7 -1
- package/dist/scripts/night-watch-pr-resolver-cron.sh +7 -3
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +5 -0
- package/dist/scripts/night-watch-qa-cron.sh +5 -0
- package/dist/web/assets/index-BmRrWWHn.js +406 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
|
@@ -167,6 +167,8 @@ process_pr() {
|
|
|
167
167
|
log "INFO: Invoking AI to resolve conflicts for PR #${pr_number}" "branch=${pr_branch}"
|
|
168
168
|
|
|
169
169
|
local ai_prompt
|
|
170
|
+
local force_push_cmd
|
|
171
|
+
force_push_cmd=$(project_git_push_command "${pr_branch}" "force-with-lease")
|
|
170
172
|
ai_prompt="You are working in a git repository at ${worktree_dir}. \
|
|
171
173
|
Branch '${pr_branch}' has merge conflicts with '${default_branch}'. \
|
|
172
174
|
Please resolve the merge conflicts by: \
|
|
@@ -174,7 +176,7 @@ Please resolve the merge conflicts by: \
|
|
|
174
176
|
2) Resolving any conflict markers in the affected files \
|
|
175
177
|
3) Staging resolved files with: git add <files> \
|
|
176
178
|
4) Continuing the rebase with: git rebase --continue \
|
|
177
|
-
5) Finally pushing with:
|
|
179
|
+
5) Finally pushing with: ${force_push_cmd} \
|
|
178
180
|
Work exclusively in the directory: ${worktree_dir}"
|
|
179
181
|
|
|
180
182
|
local -a cmd_parts
|
|
@@ -203,7 +205,7 @@ Work exclusively in the directory: ${worktree_dir}"
|
|
|
203
205
|
return 1
|
|
204
206
|
fi
|
|
205
207
|
# Push the rebased branch (AI may have already pushed; --force-with-lease is idempotent)
|
|
206
|
-
|
|
208
|
+
git_push_for_project "${worktree_dir}" --force-with-lease origin "${pr_branch}" >> "${LOG_FILE}" 2>&1 || {
|
|
207
209
|
log "WARN: Push after rebase failed for PR #${pr_number}" "branch=${pr_branch}"
|
|
208
210
|
}
|
|
209
211
|
fi
|
|
@@ -224,13 +226,15 @@ Work exclusively in the directory: ${worktree_dir}"
|
|
|
224
226
|
fi
|
|
225
227
|
|
|
226
228
|
local review_prompt
|
|
229
|
+
local review_push_cmd
|
|
230
|
+
review_push_cmd=$(project_git_push_command "${pr_branch}")
|
|
227
231
|
review_prompt="You are working in the git repository at ${review_workdir}. \
|
|
228
232
|
PR #${pr_number} on branch '${pr_branch}' has unresolved review comments requesting changes. \
|
|
229
233
|
Please: \
|
|
230
234
|
1) Run 'gh pr view ${pr_number} --comments' to read the review comments \
|
|
231
235
|
2) Implement the requested changes \
|
|
232
236
|
3) Commit the changes with a descriptive message \
|
|
233
|
-
4) Push with:
|
|
237
|
+
4) Push with: ${review_push_cmd} \
|
|
234
238
|
Work in the directory: ${review_workdir}"
|
|
235
239
|
|
|
236
240
|
local -a review_cmd_parts
|
|
@@ -631,6 +631,11 @@ while IFS=$'\t' read -r pr_number pr_branch pr_labels; do
|
|
|
631
631
|
continue
|
|
632
632
|
fi
|
|
633
633
|
|
|
634
|
+
if csv_has_label "${pr_labels:-}" "${NW_EXECUTOR_PARTIAL_LABEL}"; then
|
|
635
|
+
log "INFO: PR #${pr_number} (${pr_branch}) is labeled ${NW_EXECUTOR_PARTIAL_LABEL}; waiting for executor to finish"
|
|
636
|
+
continue
|
|
637
|
+
fi
|
|
638
|
+
|
|
634
639
|
# Merge-conflict signal: this PR needs action even if CI and score look fine.
|
|
635
640
|
MERGE_STATE=$(gh pr view "${pr_number}" --json mergeStateStatus --jq '.mergeStateStatus' 2>/dev/null || echo "")
|
|
636
641
|
if [ "${MERGE_STATE}" = "DIRTY" ] || [ "${MERGE_STATE}" = "CONFLICTING" ]; then
|
|
@@ -426,6 +426,11 @@ while IFS=$'\t' read -r pr_number pr_branch pr_title pr_labels; do
|
|
|
426
426
|
continue
|
|
427
427
|
fi
|
|
428
428
|
|
|
429
|
+
if csv_has_label "${pr_labels:-}" "${NW_EXECUTOR_PARTIAL_LABEL}"; then
|
|
430
|
+
log "SKIP-QA: PR #${pr_number} (${pr_branch}) is labeled ${NW_EXECUTOR_PARTIAL_LABEL}"
|
|
431
|
+
continue
|
|
432
|
+
fi
|
|
433
|
+
|
|
429
434
|
# Skip PRs with the skip label
|
|
430
435
|
if echo "${pr_labels}" | grep -q "${SKIP_LABEL}"; then
|
|
431
436
|
log "SKIP-QA: PR #${pr_number} (${pr_branch}) has '${SKIP_LABEL}' label"
|