Browse files

Don't delete `prose-patch` branch after submitting patch, fixes #257

When a non-collaborator user clicks commit, prose silently forks the repo, creates a branch, submits a pull request, and deletes the branch. Deleting the branch triggers GitHub to close the pull request, making a subsequent merge impossible.

This patch removes the logic from `_includes/model.js` that deletes the branch following a pull request. However, further refinement of the patching workflow may be required (e.g., to create a new branch for each pull request to avoid smushing commits together).
  • Loading branch information...
1 parent 6ef7388 commit 3cf3be8533836c55a51a5f309e8b548d50c12b86 @benbalter benbalter committed with dhcole Nov 17, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 _includes/model.js
@@ -337,10 +337,7 @@ function patchFile(user, repo, branch, path, content, message, cb) {
base: app.state.branch,
head: app.username + ":" + branch,
- createPullRequest(app.state.user, app.state.repo, pull, function(err) {
- window.forkedRepo = github().getRepo(app.username, repo);
- forkedRepo.deleteRef('heads/prose-patch', cb);
- });
+ createPullRequest(app.state.user, app.state.repo, pull, cb);

0 comments on commit 3cf3be8

Please sign in to comment.