@delegoapp/runner 0.5.4 → 0.5.5
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/executor/prompt.js +1 -1
- package/dist/git/publish.js +11 -1
- package/package.json +1 -1
package/dist/executor/prompt.js
CHANGED
|
@@ -2,7 +2,7 @@ import { promptThinkingInstruction } from '../thinking.js';
|
|
|
2
2
|
export function promptForJob(job) {
|
|
3
3
|
const thinkingInstruction = promptThinkingInstruction(job.executionPreferences.thinking);
|
|
4
4
|
const pullRequestInstruction = job.publishingPolicy.autoCreatePr
|
|
5
|
-
? 'Do NOT create a pull request yourself (do not run `gh pr create` or any equivalent). The runner will commit your changes and open the pull request automatically once you exit.'
|
|
5
|
+
? 'Do NOT create a pull request yourself (do not run `gh pr create` or any equivalent), and do NOT create or switch git branches (no `git checkout -b`, no `git switch -c`). Leave your work on the branch that is already checked out. The runner will commit your changes and open the pull request automatically once you exit.'
|
|
6
6
|
: `If you create a pull request, start the PR title with: ${job.linearIssue.identifier}:`;
|
|
7
7
|
return [
|
|
8
8
|
// This directive must come first — before task content — so Claude enters
|
package/dist/git/publish.js
CHANGED
|
@@ -53,7 +53,17 @@ export async function publishBranchAndMaybePr(repositoryPath, job, branchName, c
|
|
|
53
53
|
if (!job.publishingPolicy.autoPush) {
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
// Push the current HEAD to the runner's branch ref explicitly, rather than
|
|
57
|
+
// pushing `branchName` by name. An executor that ignores the "do not create
|
|
58
|
+
// branches" instruction may `git checkout -b` and commit its work on a
|
|
59
|
+
// different branch; HEAD then advances (so the pipeline sees new commits and
|
|
60
|
+
// reaches publishing) while the runner's named branch still points at the
|
|
61
|
+
// starting SHA. Pushing `branchName` by name would then upload a commitless
|
|
62
|
+
// branch and `gh pr create` fails with "No commits between main and <branch>".
|
|
63
|
+
// `HEAD:refs/heads/<branchName>` always carries the actual work onto the
|
|
64
|
+
// runner's branch; when HEAD already is `branchName` it behaves identically
|
|
65
|
+
// to pushing the branch by name.
|
|
66
|
+
const push = await runCommand('git', ['push', '-u', 'origin', `HEAD:refs/heads/${branchName}`], repositoryPath);
|
|
57
67
|
if (push.code !== 0) {
|
|
58
68
|
throw new Error(`Unable to push branch ${branchName}: ${push.stderr || push.stdout || 'unknown git error'}`);
|
|
59
69
|
}
|
package/package.json
CHANGED