(type: "issue" | "pr" | "schedule" | "dispatch")
| 1068 | } |
| 1069 | |
| 1070 | function generateBranchName(type: "issue" | "pr" | "schedule" | "dispatch") { |
| 1071 | const timestamp = new Date() |
| 1072 | .toISOString() |
| 1073 | .replace(/[:-]/g, "") |
| 1074 | .replace(/\.\d{3}Z/, "") |
| 1075 | .split("T") |
| 1076 | .join("") |
| 1077 | if (type === "schedule" || type === "dispatch") { |
| 1078 | const hex = crypto.randomUUID().slice(0, 6) |
| 1079 | return `opencode/${type}-${hex}-${timestamp}` |
| 1080 | } |
| 1081 | return `opencode/${type}${issueId}-${timestamp}` |
| 1082 | } |
| 1083 | |
| 1084 | async function pushToNewBranch(summary: string, branch: string, commit: boolean, isSchedule: boolean) { |
| 1085 | console.log("Pushing to new branch...") |
no outgoing calls
no test coverage detected