You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(settings): simplify auto-publish threading after review
Inline the one-ternary getCloudAutoPublish helper, pass the option value through in the request body builder, take a single settings snapshot in useTaskCreation, and split the no-repo cloud prompt into per-mode blocks mirroring the repository branch.
Generated-By: PostHog Code
Task-Id: 49d73463-ec66-491c-b645-f6116972bd02
? `- After completing code changes in a cloned repository, create a branch, stage your changes with \`git add\` and commit them with the \`git_signed_commit\` tool (do NOT use \`git commit\`/\`git push\` — they are blocked), and open a draft pull request from inside the clone without waiting to be asked.`
2734
-
: `- If the user explicitly asks you to open or update a pull request, create a branch, stage your changes with \`git add\` and commit them with the \`git_signed_commit\` tool (do NOT use \`git commit\`/\`git push\` — they are blocked), and open a draft pull request from inside the clone.`;
2735
-
constpublishClosing=shouldAutoCreatePr
2736
-
? `- Always create the PR as a draft. Do not ask for confirmation before publishing completed code changes`
2737
-
: `- Do NOT create branches, commits, push changes, or open pull requests unless the user explicitly asks for that`;
2738
2732
constpublishInstructions=
2739
2733
this.config.createPr===false
2740
2734
? `
2741
2735
When the user asks for code changes:
2742
2736
- You may clone a repository and make local edits in that clone
2743
2737
- Do NOT create branches, commits, push changes, or open pull requests in this run`
2744
-
: `
2745
-
When the user ${shouldAutoCreatePr ? "asks" : "explicitly asks"} to clone or work in a GitHub repository:
2738
+
: shouldAutoCreatePr
2739
+
? `
2740
+
When the user asks to clone or work in a GitHub repository:
2746
2741
- Clone the repository into /tmp/workspace/repos/<owner>/<repo> using \`gh repo clone <owner>/<repo> /tmp/workspace/repos/<owner>/<repo>\`
2747
2742
- Work from inside that cloned repository for follow-up code changes
2748
-
${publishTiming} Before opening the PR, check the cloned repo for a PR template at \`.github/pull_request_template.md\` (or variants; fall back to the org's \`.github\` repo via \`gh api\`) and use it as the body structure, and search for matching open issues with \`gh issue list --search\` to include \`Closes #<n>\` / \`Refs #<n>\` links.
2743
+
- After completing code changes in a cloned repository, create a branch, stage your changes with \`git add\` and commit them with the \`git_signed_commit\` tool (do NOT use \`git commit\`/\`git push\` — they are blocked), and open a draft pull request from inside the clone without waiting to be asked. Before opening the PR, check the cloned repo for a PR template at \`.github/pull_request_template.md\` (or variants; fall back to the org's \`.github\` repo via \`gh api\`) and use it as the body structure, and search for matching open issues with \`gh issue list --search\` to include \`Closes #<n>\` / \`Refs #<n>\` links.
2749
2744
- Keep the PR description brief overall. Summarize only the most important changes — do NOT enumerate every change you made. A few sentences or bullets is plenty.
2750
2745
${whyContextInstruction.trimStart()}
2751
2746
${publicRepoSafetyInstruction.trimStart()}
2752
2747
- End the PR description with a horizontal rule followed by this footer line: ${prFooter}
2753
-
${publishClosing}`;
2748
+
- Always create the PR as a draft. Do not ask for confirmation before publishing completed code changes`
2749
+
: `
2750
+
When the user explicitly asks to clone or work in a GitHub repository:
2751
+
- Clone the repository into /tmp/workspace/repos/<owner>/<repo> using \`gh repo clone <owner>/<repo> /tmp/workspace/repos/<owner>/<repo>\`
2752
+
- Work from inside that cloned repository for follow-up code changes
2753
+
- If the user explicitly asks you to open or update a pull request, create a branch, stage your changes with \`git add\` and commit them with the \`git_signed_commit\` tool (do NOT use \`git commit\`/\`git push\` — they are blocked), and open a draft pull request from inside the clone. Before opening the PR, check the cloned repo for a PR template at \`.github/pull_request_template.md\` (or variants; fall back to the org's \`.github\` repo via \`gh api\`) and use it as the body structure, and search for matching open issues with \`gh issue list --search\` to include \`Closes #<n>\` / \`Refs #<n>\` links.
2754
+
- Keep the PR description brief overall. Summarize only the most important changes — do NOT enumerate every change you made. A few sentences or bullets is plenty.
2755
+
${whyContextInstruction.trimStart()}
2756
+
${publicRepoSafetyInstruction.trimStart()}
2757
+
- End the PR description with a horizontal rule followed by this footer line: ${prFooter}
2758
+
- Do NOT create branches, commits, push changes, or open pull requests unless the user explicitly asks for that`;
0 commit comments