Route spec PR review feedback to rework-spec instead of rework-pr
Publish Image / publish (push) Successful in 23s
Details
Publish Image / publish (push) Successful in 23s
Details
When a review requests changes on a docs/ branch (architect PR), trigger the rework-spec task type instead of rework-pr. This re-runs the architect persona to fix the design docs based on review feedback. - Add rework-spec to Coder template task_type options and lightweight stages - Detect architect PRs via docs/ branch prefix in pr-rework handler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f495ea391f
commit
81aee2f7fc
|
|
@ -128,6 +128,10 @@ data "coder_parameter" "task_type" {
|
||||||
name = "Rework PR"
|
name = "Rework PR"
|
||||||
value = "rework-pr"
|
value = "rework-pr"
|
||||||
}
|
}
|
||||||
|
option {
|
||||||
|
name = "Rework Spec"
|
||||||
|
value = "rework-spec"
|
||||||
|
}
|
||||||
option {
|
option {
|
||||||
name = "Release"
|
name = "Release"
|
||||||
value = "release"
|
value = "release"
|
||||||
|
|
@ -470,7 +474,7 @@ resource "coder_agent" "main" {
|
||||||
git fetch origin develop 2>/dev/null && git checkout develop 2>/dev/null || true
|
git fetch origin develop 2>/dev/null && git checkout develop 2>/dev/null || true
|
||||||
|
|
||||||
# Lightweight stages only need the code, not a full build
|
# Lightweight stages only need the code, not a full build
|
||||||
LIGHT_STAGES="analyse architect release maintenance"
|
LIGHT_STAGES="analyse architect rework-spec release maintenance"
|
||||||
if echo "$LIGHT_STAGES" | grep -qw "$TASK_TYPE"; then
|
if echo "$LIGHT_STAGES" | grep -qw "$TASK_TYPE"; then
|
||||||
echo "Lightweight stage ($TASK_TYPE) — skipping build"
|
echo "Lightweight stage ($TASK_TYPE) — skipping build"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,11 @@ export function prRework(config: Config, queue: TaskQueue) {
|
||||||
|
|
||||||
let taskType: string | null = null;
|
let taskType: string | null = null;
|
||||||
let giteaToken: string;
|
let giteaToken: string;
|
||||||
|
const branch = event.pull_request.head.ref;
|
||||||
|
const isArchitectPR = branch.startsWith("docs/");
|
||||||
|
|
||||||
if (reviewState === "request_changes") {
|
if (reviewState === "request_changes") {
|
||||||
taskType = "rework-pr";
|
taskType = isArchitectPR ? "rework-spec" : "rework-pr";
|
||||||
giteaToken = config.giteaDevToken;
|
giteaToken = config.giteaDevToken;
|
||||||
} else if (reviewState === "approved") {
|
} else if (reviewState === "approved") {
|
||||||
taskType = "test";
|
taskType = "test";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue