@buildinternet/uploads 0.12.0 → 0.12.1

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/github-gh.js CHANGED
@@ -42,9 +42,15 @@ export function resolveRepo(explicit, run = execRunner) {
42
42
  /** Resolve the pull request associated with the current branch. */
43
43
  export function resolveCurrentPullRequest(repo, run = execRunner) {
44
44
  try {
45
+ // `gh pr view --repo` requires an explicit selector (it refuses to infer
46
+ // from the current branch), so pass the branch name as the selector.
47
+ const branch = run("git", ["rev-parse", "--abbrev-ref", "HEAD"]).trim();
48
+ if (branch === "" || branch === "HEAD")
49
+ throw new Error("detached HEAD");
45
50
  const out = run("gh", [
46
51
  "pr",
47
52
  "view",
53
+ branch,
48
54
  "--repo",
49
55
  repo,
50
56
  "--json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildinternet/uploads",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "CLI and client for uploads.sh — workspace-scoped image hosting for GitHub embeds",
5
5
  "type": "module",
6
6
  "sideEffects": false,