Skip to content

Dynamically updates pull request menu item label - #3432

Merged
joshaber merged 38 commits into
masterfrom
pr-menu-label
Dec 1, 2017
Merged

joshaber merged 38 commits into
masterfrom
pr-menu-label

Conversation

@iAmWillShepherd

@iAmWillShepherd iAmWillShepherd commented Nov 27, 2017 •

Copy link
Copy Markdown
Contributor

Fixes #2524

Comment thread app/src/lib/stores/app-store.ts Outdated
return
}

const pullRequests = await this.pullRequestStore.getPullRequests(

This comment was marked as spam.

This comment was marked as spam.

@iAmWillShepherd iAmWillShepherd added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 28, 2017
@joshaber joshaber self-assigned this Nov 28, 2017
Comment thread app/src/lib/stores/app-store.ts Outdated
})
}

private async getPullRequestLabel(repository?: Repository) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/stores/app-store.ts Outdated

/** Update the menu with the names of the user's preferred apps. */
private updatePreferredAppMenuItemLabels() {
private async updatePreferredAppMenuItemLabels(repository?: Repository) {

This comment was marked as spam.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

🥇

@joshaber joshaber 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.

📬

Comment thread app/src/lib/stores/app-store.ts Outdated
let prLabel: string | undefined

if (repository) {
prLabel = await this.getPullRequestLabel(repository)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/stores/app-store.ts Outdated
/**
* Update menu labels for editor, shell, and pull requests.
*/
private async updateMenuItemLabels(repository?: Repository) {

This comment was marked as spam.

Comment thread app/src/lib/stores/app-store.ts Outdated
const branchState = repositoryState.branchesState

if (!branchState.currentPullRequest) {
return

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@joshaber joshaber 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.

I was so focused on the code I missed what was missing here 😂

When the label is "Show Pull Request", clicking it should open directly to the PR instead of going to github.com/repo/name/pull/new/branch_name.

@iAmWillShepherd

iAmWillShepherd commented Nov 30, 2017 •

Copy link
Copy Markdown
Contributor Author

When the label is "Show Pull Request", clicking it should open directly to the PR instead of going to github.com/repo/name/pull/new/branch_name.

Got it, currently opening the url github.com/[repo]/[name]/pull/[number]

🥇

@joshaber joshaber 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.

1️⃣ 🌃

accelerator: 'CmdOrCtrl+R',
click: emit('create-pull-request'),
click:
pullRequestLabel === defaultPullRequestLabel

This comment was marked as spam.

This comment was marked as spam.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

🔢

@joshaber

joshaber commented Dec 1, 2017

Copy link
Copy Markdown
Contributor

This looks good ✨ Just needs a merge in from master 👍

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

💬

@joshaber
joshaber merged commit dd216ef into master Dec 1, 2017
@joshaber
joshaber deleted the pr-menu-label branch December 1, 2017 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants