codemodctl 0.1.31 → 0.1.33

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +14 -9
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -85,11 +85,13 @@ const createPrCommand = defineCommand({
85
85
  const codemodBranchName = branchName ? branchName : `codemod-${taskIdSignature}`;
86
86
  let remoteBaseBranch;
87
87
  try {
88
- remoteBaseBranch = (await $`git remote show origin`).stdout.match(/HEAD branch: (.+)/)?.[1]?.trim() || "main";
89
- } catch (error) {
90
- console.error("Error: Failed to get remote base branch");
91
- console.error(error);
92
- process.exit(1);
88
+ remoteBaseBranch = (await $`git symbolic-ref refs/remotes/origin/HEAD --short`).stdout.trim().replace(/^origin\//, "");
89
+ } catch {
90
+ try {
91
+ remoteBaseBranch = (await $`git rev-parse --abbrev-ref HEAD`).stdout.trim();
92
+ } catch {
93
+ remoteBaseBranch = "main";
94
+ }
93
95
  }
94
96
  if (codemodBranchName) prData.head = codemodBranchName;
95
97
  if (remoteBaseBranch) prData.base = remoteBaseBranch;
@@ -116,10 +118,13 @@ const createPrCommand = defineCommand({
116
118
  process.exit(1);
117
119
  }
118
120
  try {
119
- await $({ env: process.env.DEBUG ? {
120
- GIT_TRACE: "1",
121
- GIT_TRACE_PACKET: "1"
122
- } : {} })`git push origin ${codemodBranchName} --force`;
121
+ await $({ env: {
122
+ GIT_CURL_VERBOSE: "1",
123
+ ...process.env.DEBUG ? {
124
+ GIT_TRACE: "1",
125
+ GIT_TRACE_PACKET: "1"
126
+ } : {}
127
+ } })`git -c http.version=HTTP/1.1 -c http.postBuffer=524288000 push origin HEAD:refs/heads/${codemodBranchName} --force --no-thin`;
123
128
  console.log(`Pushed branch to origin: ${codemodBranchName}`);
124
129
  } catch (error) {
125
130
  console.error("Error: Failed to push changes");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemodctl",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "CLI tool and utilities for workflow engine operations, file sharding, and codeowner analysis",
5
5
  "type": "module",
6
6
  "exports": {