desktop / desktop/desktop

Creating Pull Request doesn't take fork behavior into account

Open
#15,489 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
21.8k
Forks
10.5k
Avg merge
1d 15h
Merged PRs (30d)
25

Description

### The problem

Using Branch -> Create Pull Request from a fork, will open the browser to create the PR in the parent repo, even if the fork behavior is set to "For my own purposes": https://github.com/desktop/desktop/blob/eeec2730468db2adb14256bca01002c7532dc963/app/src/lib/stores/app-store.ts#L6041-L6058

### Release version

3.1.2

### Operating system

macOS Monterey 12.6

### Steps to reproduce the behavior

1. Fork a repository
2. Set its fork behavior to `For my own purposes`
3. Create a branch
4. Commit some changes
5. Click on `Branch` -> `Create Pull Request`

You'd expect to be creating a PR to your fork repo, but instead you will create it in the parent repo.

### Log files

_No response_

### Screenshots

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in app/src/lib/stores/app-store.ts at lines 6041-6058, then reproduce the Branch -> Create Pull Request flow using a fork set to “For my own purposes.” Trace how the fork behavior affects the target repository, and verify that the PR opens against the fork in that mode while existing behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, git, github, typescript
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.