Browse Source

Shows merged PRs on root branches

main
Eric Amodio 3 years ago
parent
commit
92c993de6f
3 changed files with 9 additions and 3 deletions
  1. +4
    -0
      CHANGELOG.md
  2. +2
    -2
      README.md
  3. +3
    -1
      src/views/nodes/branchNode.ts

+ 4
- 0
CHANGELOG.md View File

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## [Unreleased] ## [Unreleased]
### Changed
- Changes to additionally show merged pull requests at the root of the _Commits_ and _Repositories_ views
### Fixed ### Fixed
- Fixes [#1357](https://github.com/eamodio/vscode-gitlens/issues/1357) - Branch sorting may be reversed — thanks to [PR #1358](https://github.com/eamodio/vscode-gitlens/pull/1358) by sueka ([@sueka](https://github.com/sueka)) - Fixes [#1357](https://github.com/eamodio/vscode-gitlens/issues/1357) - Branch sorting may be reversed — thanks to [PR #1358](https://github.com/eamodio/vscode-gitlens/pull/1358) by sueka ([@sueka](https://github.com/sueka))

+ 2
- 2
README.md View File

@ -267,7 +267,7 @@ The _Commits_ view lists all of the commits on the current branch, and additiona
![Merging](https://raw.githubusercontent.com/eamodio/vscode-gitlens/main/images/docs/commits-view-merge.png) ![Merging](https://raw.githubusercontent.com/eamodio/vscode-gitlens/main/images/docs/commits-view-merge.png)
- **Rebasing <branch>** or **Resolve conflicts to continue rebasing <branch>** — shows the number of rebase steps left, the commit the rebase is paused at, and lists any conflicted files. Conflicted files show comparisons with the common base of the current and incoming changes to aid in resolving the conflict by making it easier to see where changes originated - **Rebasing <branch>** or **Resolve conflicts to continue rebasing <branch>** — shows the number of rebase steps left, the commit the rebase is paused at, and lists any conflicted files. Conflicted files show comparisons with the common base of the current and incoming changes to aid in resolving the conflict by making it easier to see where changes originated
![Rebasing](https://raw.githubusercontent.com/eamodio/vscode-gitlens/main/images/docs/commits-view-rebase.png) ![Rebasing](https://raw.githubusercontent.com/eamodio/vscode-gitlens/main/images/docs/commits-view-rebase.png)
- any associated pull request — shows any opened pull request associated with the current branch
- any associated pull request — shows any opened or merged pull request associated with the current branch
--- ---
@ -301,7 +301,7 @@ The Repositories view lists opened Git repositories, and additionally provides,
- **Changes to push to <remote>** — lists of all the unpublished commits and all of the files changed in them, when the current branch has commits that waiting to be pushed to the upstream remote - **Changes to push to <remote>** — lists of all the unpublished commits and all of the files changed in them, when the current branch has commits that waiting to be pushed to the upstream remote
- **Merging into <branch>** or **Resolve conflicts before merging into <branch>** — lists any conflicted files. Conflicted files show comparisons with the common base of the current and incoming changes to aid in resolving the conflict by making it easier to see where changes originated - **Merging into <branch>** or **Resolve conflicts before merging into <branch>** — lists any conflicted files. Conflicted files show comparisons with the common base of the current and incoming changes to aid in resolving the conflict by making it easier to see where changes originated
- **Rebasing <branch>** or **Resolve conflicts to continue rebasing <branch>** — shows the number of rebase steps left, the commit the rebase is paused at, and lists any conflicted files. Conflicted files show comparisons with the common base of the current and incoming changes to aid in resolving the conflict by making it easier to see where changes originated - **Rebasing <branch>** or **Resolve conflicts to continue rebasing <branch>** — shows the number of rebase steps left, the commit the rebase is paused at, and lists any conflicted files. Conflicted files show comparisons with the common base of the current and incoming changes to aid in resolving the conflict by making it easier to see where changes originated
- any associated pull request — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows any opened pull request associated with the current branch
- any associated pull request — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows any opened or merged pull request associated with the current branch
- **Commits** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows the current branch commits, similar to the [Commits view](#commits-view- 'Commits view') - **Commits** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows the current branch commits, similar to the [Commits view](#commits-view- 'Commits view')
- **Branches** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows the local branches, similar to the [Branches view](#branches-view- 'Branches view') - **Branches** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows the local branches, similar to the [Branches view](#branches-view- 'Branches view')
- **Remotes** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows the remotes and remote branches, similar to the [Remotes view](#remotes-view- 'Remotes view') - **Remotes** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows the remotes and remote branches, similar to the [Remotes view](#remotes-view- 'Remotes view')

+ 3
- 1
src/views/nodes/branchNode.ts View File

@ -149,7 +149,9 @@ export class BranchNode
this.view.config.pullRequests.enabled && this.view.config.pullRequests.enabled &&
this.view.config.pullRequests.showForBranches && this.view.config.pullRequests.showForBranches &&
(this.branch.tracking || this.branch.remote) (this.branch.tracking || this.branch.remote)
? this.branch.getAssociatedPullRequest(this.root ? { include: [PullRequestState.Open] } : undefined)
? this.branch.getAssociatedPullRequest(
this.root ? { include: [PullRequestState.Open, PullRequestState.Merged] } : undefined,
)
: undefined, : undefined,
range && !this.branch.remote range && !this.branch.remote
? Container.git.getLogRefsOnly(this.uri.repoPath!, { ? Container.git.getLogRefsOnly(this.uri.repoPath!, {

Loading…
Cancel
Save