Skip to content

Commit 92c993d

Browse files
committed
Shows merged PRs on root branches
1 parent 8edc1a5 commit 92c993d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- Changes to additionally show merged pull requests at the root of the _Commits_ and _Repositories_ views
12+
913
### Fixed
1014

1115
- 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))

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ The _Commits_ view lists all of the commits on the current branch, and additiona
267267
![Merging](https://raw.githubusercontent.com/eamodio/vscode-gitlens/main/images/docs/commits-view-merge.png)
268268
- **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
269269
![Rebasing](https://raw.githubusercontent.com/eamodio/vscode-gitlens/main/images/docs/commits-view-rebase.png)
270-
- any associated pull request — shows any opened pull request associated with the current branch
270+
- any associated pull request — shows any opened or merged pull request associated with the current branch
271271

272272
---
273273

@@ -301,7 +301,7 @@ The Repositories view lists opened Git repositories, and additionally provides,
301301
- **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
302302
- **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
303303
- **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
304-
- any associated pull request — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows any opened pull request associated with the current branch
304+
- 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
305305
- **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')
306306
- **Branches** — [optionally](#repositories-view-settings- 'Jump to the Repositories view settings') shows the local branches, similar to the [Branches view](#branches-view- 'Branches view')
307307
- **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')

src/views/nodes/branchNode.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ export class BranchNode
149149
this.view.config.pullRequests.enabled &&
150150
this.view.config.pullRequests.showForBranches &&
151151
(this.branch.tracking || this.branch.remote)
152-
? this.branch.getAssociatedPullRequest(this.root ? { include: [PullRequestState.Open] } : undefined)
152+
? this.branch.getAssociatedPullRequest(
153+
this.root ? { include: [PullRequestState.Open, PullRequestState.Merged] } : undefined,
154+
)
153155
: undefined,
154156
range && !this.branch.remote
155157
? Container.git.getLogRefsOnly(this.uri.repoPath!, {

0 commit comments

Comments
 (0)