Skip to content

fix(editor): update closed pull requests and harden branch creation - #4376

Merged
LucasHT22 merged 8 commits into
hackclub:mainfrom
SSoggyTacoMan:fix/editor-publish-closed-pr
Oct 15, 2026
Merged

LucasHT22 merged 8 commits into
hackclub:mainfrom
SSoggyTacoMan:fix/editor-publish-closed-pr

Conversation

@SSoggyTacoMan

Copy link
Copy Markdown
Contributor

Summary

When an author's pull request is closed (e.g. by a maintainer or bot triage) and they click Publish The Game again to push revisions:

  1. findGamePullRequest ignored closed PRs, forcing a new branch/PR creation flow.
  2. createBranch sent JSON without Content-Type: application/json header, threw 404, or hit unprovisioned fork timing.
  3. The author was unable to publish and confused about locked branches.

Changes

  • Match unmerged closed pull requests for the game in findGamePullRequest.
  • Push revisions directly to the game's existing PR branch.
  • Attempt to reopen closed PRs; if closed by a collaborator (GitHub 422), notify the author to ask a reviewer to reopen.
  • Fix missing Content-Type header in createBranch, createCommit, and createPullRequest.
  • Point default branch sha lookup to upstream main.
  • Validate GitHub token against /user rather than /.
  • Add direct repository lookup before paging forks.

@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@SSoggyTacoMan is attempting to deploy a commit to the Hack Club Team on Vercel.

A member of the Team first needs to authorize it.

@SSoggyTacoMan
SSoggyTacoMan marked this pull request as ready for review October 13, 2026 08:51

@LucasHT22 LucasHT22 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edge case: the closed-PR search silently ignores API errors and returns null, so the publish flow can create a new PR even when it couldn't confirm that an existing one doesn't exist

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sprig Ready Ready Preview Oct 15, 2026 7:38pm UTC

Request Review

@SSoggyTacoMan

Copy link
Copy Markdown
Contributor Author

(this is about that edge case in #sprig channel you dmed about)

@LucasHT22 LucasHT22 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does works but a review is worth it, i'm gonna merge for now but let's keep an eye on this

@LucasHT22
LucasHT22 added this pull request to the merge queue Oct 15, 2026
Merged via the queue into hackclub:main with commit fb2667d Oct 15, 2026
8 checks passed
@SSoggyTacoMan
SSoggyTacoMan deleted the fix/editor-publish-closed-pr branch October 15, 2026 19:55

This branch was successfully deployed

1 active deployment
Preview — 24e458cf Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants