#4608 Drop the adopt button when the package is retired
Merged 4 years ago by pingou. Opened 4 years ago by pingou.

@@ -222,6 +222,26 @@ 

          });

        });

        {% endif %}

+       {% if repo.user.user == "orphan" %}

+       $.ajax({

+         url: "{{ url_for('distgit_ns.get_actived_status', repo=repo.name, namespace=repo.namespace) }}",

+         type: 'GET',

+         dataType: 'json',

+         success: function(res) {

+           if (!res.active){

+             var _btn = $("#take-orphan-button");

+             _btn.off("click");

+             _btn.click(function(){

+                 window.open(

+                     "https://pagure.io/releng/new_issue?title="

+                     + "Unretire {{repo.namespace}}/{{repo.name}}");

+             });

+             _btn.prop( "title", "Package retired - Open a releng ticket to adopt it" );

+             _btn.html("Retired");

+           }

+         }

+       });

+       {% endif %}

  

      });

    </script>

This relates on https://pagure.io/pagure-dist-git/pull-request/78 which introduce this new endpoint.

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

rebased onto f5891c887c2ffdfe78405e6cdb8b9c6ddf9514dd

4 years ago

pretty please pagure-ci rebuild

4 years ago

Would be great if we add an 'Open a releng ticket' button on this case, but otherwise seems fine for me (but nor for jenkins? :S )

pretty please pagure-ci rebuild

4 years ago

pretty please pagure-ci rebuild

4 years ago

The test suite is failing due to #4611 . #4612 should temporary fix it.

rebased onto 3cc2790c227aebecafc5c8ef00f2668b26f3fe60

4 years ago

rebased onto e00e54cac5cab1d9f4cc125421baa06151859a76

4 years ago

rebased onto 94e3818

4 years ago

This isn't covered by the tests so I'm going to merge it directly :)

Thanks for your review!

Pull-Request has been merged by pingou

4 years ago