#5055 Allow people with a fork to have a working drop-down for opening new PRs
Merged 3 years ago by pingou. Opened 3 years ago by pingou.

@@ -321,7 +321,7 @@ 

  

  {% if g.authenticated and not g.repo_obj.is_empty %}

  

- {% if g.repo_committer %}

+ {% if g.repo_committer or g.repo_forked %}

  var _cnt = 0;

  

  function process_task_results(_data, callback) {
@@ -417,6 +417,8 @@ 

        _b.show();

        $("#pr-dropdown-mainlist .pr-dropdown-spinner").hide();

    })

+   {% else %}

+   $("#pr-dropdown-mainlist .pr-dropdown-spinner").hide();

    {% endif %}

  

    var data = {

Basically, the drop-down for opening new PR from the main page of a
main project was conditioned on having commit right on that main
project. However, if you have a fork and no access to the main
project, the drop-down was not returning.
Now, we're checking if you have access to the main project or if
you have a fork and in either case the JS ensuring the drop-down
will populate fine.

Fixes https://pagure.io/fedora-infrastructure/issue/9497

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

1 new commit added

  • Drop the spinner from the drop-down menu if the user is not a committer
3 years ago

Thanks for the review! :)

Pull-Request has been merged by pingou

3 years ago