Compare changes
Choose two branches to see what one has that the other does not, then open a pull request for it.
1 commit
1 file+10−10/1 viewed
| 36 | 36 | return null; | |
| 37 | 37 | } | |
| 38 | 38 | ||
| 39 | + | /** The branch checked out, or null when detached. */ | |
| 40 | + | function currentBranch() { | |
| 41 | + | try { | |
| 42 | + | return execFileSync("git", ["branch", "--show-current"], { cwd: ROOT, encoding: "utf8" }).trim() || null; | |
| 43 | + | } catch { | |
| 44 | + | return null; | |
| 45 | + | } | |
| 46 | + | } | |
| 47 | + | ||
| 39 | 48 | function remoteUrls() { | |
| 40 | 49 | try { | |
| 41 | 50 | const names = execFileSync("git", ["remote"], { cwd: ROOT, encoding: "utf8" }).split("\n").filter(Boolean); | |
| 61 | 70 | method: "POST", | |
| 62 | 71 | headers, | |
| 63 | 72 | body: JSON.stringify({ | |
| 64 | − | ref: head, | |
| 73 | + | ref: currentBranch() ?? head, | |
| 65 | 74 | sha: head, | |
| 66 | 75 | environment: "production", | |
| 67 | 76 | production_environment: true, |