Skip to content

Default "create an issue" to create issue in parent repository - #9270

Merged
outofambit merged 5 commits into
developmentfrom
ku-create-issue-in-parent-repo
Mar 13, 2020
Merged

outofambit merged 5 commits into
developmentfrom
ku-create-issue-in-parent-repo

Conversation

@kuychaco

Copy link
Copy Markdown
Contributor

Closes #9232

Description

Currently clicking "Create Issue on GitHub" creates an issue on the current repository opened in Desktop.

With this PR, if the current repo is a fork and the parent repo (upstream) has issues enabled, then clicking "Create Issue on GitHub" creates an issue on the parent/upstream repository.

If there is a parent/upstream and issues are disabled (or the repo has been archived) then the "Create Issue on GitHub" menu item is disabled/greyed out. We believe that in the vast majority of use cases a fork exists in order to allow someone to contribute to the upstream repository, so we assume issue creation is also intended for the upstream repository.

And if there is no parent/upstream associated with the current repository, then clicking "Create Issue on GitHub" creates an issue on the current repository opened in Desktop (current behavior).

Release notes

Notes:

@kuychaco
kuychaco requested a review from outofambit March 12, 2020 22:51

@outofambit outofambit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good overall @kuychaco, left one question!

Comment thread app/src/lib/menu-update.ts Resolved
Comment thread app/src/ui/app.tsx
Comment on lines +1113 to +1115
const url =
this.getParentRepositoryGitHubURL() ||
this.getCurrentRepositoryGitHubURL()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice! :)

@outofambit outofambit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉

@outofambit outofambit self-assigned this Mar 13, 2020
@outofambit
outofambit merged commit f9a0940 into development Mar 13, 2020
@outofambit
outofambit deleted the ku-create-issue-in-parent-repo branch March 13, 2020 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default "create an issue" to create it in the parent repository

2 participants