← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~jugmac00/launchpad:add-link-to-all-merge-proposals into launchpad:master

 

Jürgen Gmach has proposed merging ~jugmac00/launchpad:add-link-to-all-merge-proposals into launchpad:master.

Commit message:
Add link to all merge proposals

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1951128 in Launchpad itself: "no button / navigation to list of all merge proposals if there are no active open proposals"
  https://bugs.launchpad.net/launchpad/+bug/1951128

For more details, see:
https://code.launchpad.net/~jugmac00/launchpad/+git/launchpad/+merge/412860
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/launchpad:add-link-to-all-merge-proposals into launchpad:master.
diff --git a/lib/lp/code/browser/tests/test_gitlisting.py b/lib/lp/code/browser/tests/test_gitlisting.py
index 4bed9f8..e89417d 100644
--- a/lib/lp/code/browser/tests/test_gitlisting.py
+++ b/lib/lp/code/browser/tests/test_gitlisting.py
@@ -346,6 +346,22 @@ class TestProductGitListingView(TestTargetGitListingView,
         view = create_initialized_view(self.target, '+git')
         self.assertIsNotNone(find_tag_by_id(view(), 'active-review-count'))
 
+    def test_all_reviews_link(self):
+        main_repo = self.factory.makeGitRepository(
+            owner=self.owner, target=self.target, name="foo")
+        git_refs = self.factory.makeGitRefs(
+            main_repo,
+            paths=["refs/heads/master", "refs/heads/1.0", "refs/tags/1.1"])
+
+        with admin_logged_in():
+            self.setDefaultRepository(target=self.target, repository=main_repo)
+
+        self.factory.makeBranchMergeProposalForGit(
+            target_ref=git_refs[0],
+            set_state=BranchMergeProposalStatus.NEEDS_REVIEW)
+        view = create_initialized_view(self.target, '+git')
+        self.assertIsNotNone(find_tag_by_id(view(), 'all-reviews'))
+
     def test_personal_git_instructions_not_present(self):
         with person_logged_in(self.owner):
             view = create_initialized_view(
diff --git a/lib/lp/code/templates/gitlisting.pt b/lib/lp/code/templates/gitlisting.pt
index 73109d8..77c7d40 100644
--- a/lib/lp/code/templates/gitlisting.pt
+++ b/lib/lp/code/templates/gitlisting.pt
@@ -74,6 +74,8 @@ git push --set-upstream origin master
           <tal:repository-management
             replace="structure repository/@@++repository-management" />
         </div>
+        <p>
+        </p>
         <p id="active-review-count"
           tal:define="count context/menu:branches/active_review_count|nothing;
                       link context/menu:branches/active_reviews|nothing"
@@ -82,6 +84,9 @@ git push --set-upstream origin master
           <tal:active-count replace="count"/>
           <tal:link replace="structure python: link.render().lower()"/>.
         </p>
+        <p id="all-reviews">
+            <a href="+merges">See all merge proposals</a>.
+        </p>
       </div>
 
 

Follow ups