Skip to content

GitHub App: add docs#12114

Closed
stsewd wants to merge 4 commits into
mainfrom
add-docs-gh-app
Closed

GitHub App: add docs#12114
stsewd wants to merge 4 commits into
mainfrom
add-docs-gh-app

Conversation

@stsewd
Copy link
Copy Markdown
Member

@stsewd stsewd commented Apr 15, 2025

Extracted from #11942

Closes #12129


📚 Documentation previews 📚

stsewd added a commit that referenced this pull request May 14, 2025
First I wanted to pass the env var just in the clone step, but we don't
allow passing additional env vars once the environment is created, so
it's available in the whole "clone" environment. The access token we
create is read-only, and should be scoped to just one project as well
(waiting on PyGithub/PyGithub#3287).

Once the clone is done, the token is stored in the .git/config file, so
that token isn't always kept secret from the rest of the build like ssh
keys, but since the token is read-only and scoped to the current
project, and temporary (1 hour). It should be fine. Additionally, the
token is only created for private repos, meaning that only people with
explicit access to the repo may be able to extract the token, but again,
since they already have access to the repo, there is no additional
permissions the token is granting to the user (will document this in
#12114).
@stsewd stsewd marked this pull request as ready for review May 15, 2025 19:49
@stsewd stsewd requested a review from a team as a code owner May 15, 2025 19:49
@stsewd stsewd requested a review from ericholscher May 15, 2025 19:50
Copy link
Copy Markdown
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with some suggestions.

Comment on lines +11 to +16
Read the Docs uses SSH keys (with read only permissions) for GitLab and Bitbucket in order to clone private repositories,
this key is added to your main repository, but not to your submodules.
For GitHub we make use of a temporary token generated using our :ref:`GitHub App <reference/git-integration:GitHub App>`.

When a project is created, a SSH key is automatically generated.
You can use this SSH key to give Read the Docs access to clone your private submodules.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would finish taking about SSH keys and submodules first and then explain the GitHub case.

Suggested change
Read the Docs uses SSH keys (with read only permissions) for GitLab and Bitbucket in order to clone private repositories,
this key is added to your main repository, but not to your submodules.
For GitHub we make use of a temporary token generated using our :ref:`GitHub App <reference/git-integration:GitHub App>`.
When a project is created, a SSH key is automatically generated.
You can use this SSH key to give Read the Docs access to clone your private submodules.
When adding a private GitLab and/or a Bitbucket project,
Read the Docs will generate a SSH key (with read only permissions) and add it to the repository to be able to clone. This SSH key is not added to the submodules of the repository.
In case you need to clone the private submodules, you can add this SSH key on those repositories as well.
When adding a GitHub project, Read the Docs make use of a temporary token generated using our :ref:`GitHub App <reference/git-integration:GitHub App>` instead of SSH keys.

Comment thread docs/user/guides/setup/git-repo-manual.rst
Comment thread docs/user/reference/git-integration.rst Outdated
Comment thread docs/user/reference/git-integration.rst Outdated
Comment thread docs/user/reference/git-integration.rst Outdated
Comment thread docs/user/reference/git-integration.rst Outdated
Comment thread docs/user/reference/git-integration.rst Outdated
#. Click the |:heavy_plus_sign:| button to the right of your ``rtd-tutorial`` project. If the list of repositories is empty, click the |:arrows_counterclockwise:| button.
#. Click on :guilabel:`Install GitHub App on repository`, and choose your account and select the repository you created in the previous step.

.. figure:: /_static/images/tutorial/rtd-import-projects.gif
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note that we are deleting an image here. I know that @agjohnson wanted to re-new/re-take them using the new dashboard.

Comment thread docs/user/tutorial/index.rst Outdated
Comment thread docs/user/tutorial/index.rst Outdated
@stsewd stsewd added the Status: blocked Issue is blocked on another issue label May 28, 2025
@stsewd
Copy link
Copy Markdown
Member Author

stsewd commented May 28, 2025

This is blocked until we ship the app to everyone, but ported the content about the app to #12217.

@stsewd
Copy link
Copy Markdown
Member Author

stsewd commented Aug 28, 2025

Superseded by #12452

@stsewd stsewd closed this Aug 28, 2025
@stsewd stsewd deleted the add-docs-gh-app branch August 28, 2025 19:16
stsewd added a commit that referenced this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: blocked Issue is blocked on another issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub App: write docs

2 participants