<html><head><meta http-equiv="Content-Type" content="text/html charset=gb2312"><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Pierre,</div><div class=""><br class=""></div><div class="">Thank you very much!</div><div class=""><br class=""><br class=""></div><blockquote type="cite" class=""><span class="">So as far as I know, currently, you are using web-hooks to do sync betwee</span>n</blockquote><blockquote type="cite" class=""><span class="">pagure and github.</span></blockquote><blockquote type="cite" class=""><span class="">Did you consider using the underlying requests repo of the project?</span><br class=""></blockquote><div class=""><br class=""></div><div class="">Yes, I also think it is the best way to track PRs. GitHub PRs are equivalents of Pagure requests. And we can include more metadata in requests. </div><br class=""><blockquote type="cite" class=""><span class="">In other words, for each project in pagure, there are 4 git repos:</span><br class=""><span class="">- the code of the project (the repo people clone/fork/work on)</span><br class=""><span class="">- the doc repo, for storing the project's documentation if that project wishes</span><br class=""><span class="">  to</span><br class=""><span class="">- the tickets repo of the project (a JSON representation of every issue ever</span><br class=""><span class="">  opened against the project)</span><br class=""><span class="">- the request repo of the project (a JSON representation of every pull-request</span><br class=""><span class="">  and discussion about it opened against the project)</span><br class=""><span class=""></span><br class=""><span class="">All links are available at the bottom of the project's overview page.</span><br class=""><span class="">Note: tickets and requests repos are private (only people with commit to the</span><br class=""><span class="">main repo can clone them)</span><br class=""></blockquote><div class=""><br class=""></div><div class="">Really helpful, thanks! It is more flexible than using API / web hooks.</div><div class=""><br class=""></div><div class="">If we run a pagure instance locally, we just directly modify the ticket repo, commit the changes and all set ;) Love it!</div><br class=""><blockquote type="cite" class=""><span class=""></span><br class=""><span class="">So when using the requests repo, upon receiving a notification from github, you</span><br class=""><span class="">could create/update the appropriate JSON blob representing the pull-request and</span><br class=""><span class="">push it to the requests repo.</span><br class=""></blockquote><div class=""><br class=""></div><div class="">We keep the code repo synced using a same workflow (pull from github to get the changes, then push to pagure) now. I think it will also work well for ticket repo.</div><br class=""><blockquote type="cite" class=""><span class="">From their pagure should update its database via a git hook to reflect the</span><br class=""><span class="">new/update the PR in its UI.</span><br class=""></blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><span class="">Note: while interesting this is a part of the code that has been completely</span><br class=""><span class="">tested yet, so we might run into a few bugs (in this case I guess we would run</span><br class=""><span class="">into a few settings not being loaded correctly, nothing too problematic</span><br class=""><span class="">normally).</span></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""><span class="">Note2: I wonder if the PR model in Pagure could not be reworked so that it</span><br class=""><span class="">defines the address of the repo from which to pull the changes, rather than</span><br class=""><span class="">pointing to a pagure's project.</span><br class=""><span class="">This way, we could open a PR on pagure from a repo hosted elsewhere.</span><br class=""></blockquote><div class=""><br class=""></div>If we have this feature, that'll be awesome! The major problem of using requests now is about creating requests. Because we have to create a pagure project for each user who open a PR on github (so pagure can pull the changes from those projects). Also, we need to create an account for each user. ThatĄŻll be difficult to manage. If we can pull changes directly from github, then all we need is a link :)<div class=""><br class=""></div><div class="">We are now implementing a two-way sync between pagure and github (mainly comments, so users and staff can discuss and donĄŻt need to leave their own platform). Two-way syncs are a little bit tricky, though ;) I think we may encounter some problems when dealing with high frequency changes.</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><span class=""></span><br class=""><span class="">So many ideas :)</span><br class=""><span class=""></span><br class=""><span class=""></span><br class=""><span class="">Pierre</span><br class=""><span class="">_______________________________________________</span><br class=""><span class="">CentOS-docs mailing list</span><br class=""><span class=""><a href="mailto:CentOS-docs@centos.org" class="">CentOS-docs@centos.org</a></span><br class=""><span class=""><a href="http://lists.centos.org/mailman/listinfo/centos-docs" class="">http://lists.centos.org/mailman/listinfo/centos-docs</a></span><br class=""></blockquote><br class=""></div><div class="">Best regards,</div><div class="">Lei</div></body></html>