This project involves automatically building docs for Pull Requests in GitHub repositories.
This Issue will work as the initial discussion for completing this project.
We can extend this to other issues when required while working on this part by part.
Pull requests event from Github webhooks. So, I think there is no need to do any changes to that.git fetch origin +refs/pull/<pr_number>/merge:versions for pull requests. we can separate the PR versions by adding a Boolean field to Version Model or adding a type to VERSION_TYPES.pull_request, Action: opened)pull_request, Action: synchronize)pull_request, Action: closed, Merged: True/False)I would like to know Everyone's Initial Thoughts about it and carry the discussion forward :)
I think we should move to Github Apps. @saadmk11 Can you evaluate Github Apps to know if we can move to Github Apps?
The important part is, how do we serve the documentation. Should be it in the same domain or it should be served from different domain/subdomain. Moreover, are we going to support only Github or we should also evaluate if we can support Github/Gitlab both.
The important part is, how do we serve the documentation. Should be it in the same domain or it should be served from different domain/subdomain.
@safwanrahman I was thinking we could serve the PR builds using <pr_number> namespace.
We can do something like: : https://<project_slug>.readthedocs.io/en/pr/<pr_number>/
What do you think ?
Moreover, are we going to support only Github or we should also evaluate if we can support Github/Gitlab both.
We can get started with Github and then extend to Gitlab if we can support it.
I think we should move to Github Apps. @saadmk11 Can you evaluate Github Apps to know if we can move to Github Apps?
I read briefly about Github apps from the official Documentations. Github App has many differences from the OAuth implementation that we are currently using. we would need a good amount of refactoring to implement this and it is not as flexible as our current implementation.
Github Apps Provide Built-in, centralized webhooks receive events for all repositories and organizations the app can access. Conversely, OAuth Apps require configuring a webhook for each repository and organization accessible to the user.
Read More
Which we do not want.
It needs permissions to a users repository manually.
We've decided to not block this work on migration to GitHub apps. We already have migrating to GH apps on our roadmap in a few months though, so we'll deal with the change then.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@saadmk11 what's the status of this issue? I think it's OK to close it, but not as stale because everything is implemented, right?
Yes, we can close this issue as everything discussed here has been implemented.
@safwanrahman @agjohnson I saw you mentioning migration to GitHub Apps earlier. This is a topic I'm interested in a lot so if there's any help with reviews of relevant PRs needed, feel free to ping me for help.
P.S. I'm developing a small framework for making GitHub Apps (something similar to Probot which is in JS) in Python. You can try out how it feels by following this tutorial: https://tutorial.octomachinery.dev/ (beware of bugs! there's some inconsistency that I haven't yet fixed in the tutorial itself).
It's Python 3.7+ so I'm not sure if it'll fit your needs but if you need any help with integration and decide to try it out, feel free to text me and I'll see what I can do here.
@webknjaz thanks, I have linked your comment in our internal ticket where we are tracking the migration
Most helpful comment
@webknjaz thanks, I have linked your comment in our internal ticket where we are tracking the migration