0242c13 frontend: fix createrepo for pull-request copr-dirs

2 files Authored by praiskup 4 years ago, Committed by praiskup 4 years ago,
    frontend: fix createrepo for pull-request copr-dirs
    
    We did not create action for createrepo when we created new CoprDir for
    pull-request.  This in turn caused that backend never took the build
    task, because we implemented the wait-for-repo loop in commit
    6cf66a9b138.  So create the repository explicitly in
    CoprDirsLogic.get_or_create() for now to work-around the problem.
    
    This isn't really proper fix; we should bound the createrepo action with
    *any* CoprDir creation, and create CoprDir automatically with new
    CoprChroot instance.  But it will require proper testing and I don't
    have enough time before release.
    
    While I'm on it, I'm also adding 'main_only' argument to
    send_createrepo.  This is by default True, so when user hits the
    createrepo button we don't have to regenerate all the pull-request
    directories.
    
    Relates: #1135