Skip to content

Commit 077abcf

Browse files
authored
Docs: update docs to mention GitHub app (#12452)
Mostly extracted from #12114 Closes #12129
1 parent e1cf9ba commit 077abcf

File tree

4 files changed

+61
-16
lines changed

4 files changed

+61
-16
lines changed

docs/user/guides/private-submodules.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ How to use private Git submodules
88
If you are using private Git repositories and they also contain private Git submodules,
99
you need to follow a few special steps.
1010

11-
Read the Docs uses SSH keys (with read only permissions) in order to clone private repositories.
12-
A SSH key is automatically generated and added to your main repository, but not to your submodules.
13-
In order to give Read the Docs access to clone your submodules you'll need to add the public SSH key to each repository of your submodules.
11+
When a project is created, a SSH key is automatically generated.
12+
You can use this SSH key to give Read the Docs access to clone your private submodules.
1413

1514
.. note::
1615

@@ -35,6 +34,11 @@ to give read access to several repositories using only one SSH key.
3534

3635
#. Remove the SSH deploy key that was added to the main repository on GitHub
3736

37+
.. note::
38+
39+
If you are using our :ref:`reference/git-integration:GitHub App` to connect your repository to Read the Docs,
40+
you can skip this step, because access to your repository is controlled through the App instead of a deploy key.
41+
3842
#. Go to your project on GitHub
3943
#. Click on :guilabel:`Settings`
4044
#. Click on :guilabel:`Deploy Keys`

docs/user/guides/pull-requests.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ How to configure pull request builds
44
In this section, you can learn how to configure :doc:`pull request builds </pull-requests>`.
55

66
To enable pull request builds for your project,
7-
your Read the Docs account needs to be connected to an account with a supported Git provider, with a webhook configured to send information on pull requests for your repository.
7+
your Read the Docs project needs to be connected to a repository from a supported Git provider.
88
See `Limitations`_ for more information.
99

10-
If your account is already connected:
11-
1210
#. Go to your project dashboard
13-
#. Go to :guilabel:`Admin`, then :guilabel:`Settings`
11+
#. Go to :guilabel:`Settings`, then :guilabel:`Pull request builds`
1412
#. Enable the :guilabel:`Build pull requests for this project` option
15-
#. Click on :guilabel:`Save`
13+
#. Click on :guilabel:`Update`
1614

1715
.. tip::
1816

@@ -44,18 +42,19 @@ while private previews are only available to users with access to the Read the D
4442
To change the privacy level:
4543

4644
#. Go to your project dashboard
47-
#. Go to :guilabel:`Admin`, then :guilabel:`Settings`
45+
#. Go to :guilabel:`Settings`, then :guilabel:`Pull request builds`
4846
#. Select your option in :guilabel:`Privacy level of builds from pull requests`
49-
#. Click on :guilabel:`Save`
47+
#. Click on :guilabel:`Update`
5048

5149
Privacy levels work the same way as :ref:`normal versions <versions:Version states>`.
5250

5351
Limitations
5452
-----------
5553

5654
- Pull requests are only available for **GitHub** and **GitLab** currently. Bitbucket is not yet supported.
57-
- To enable this feature, your Read the Docs account needs to be connected to an
58-
account with your Git provider, *and* the connecting webhook must be configured to send on creation of a pull request, not just on pushes to your main branch.
55+
- To enable this feature, your Read the Docs project needs to be connected to a repository from a supported Git provider.
56+
- If your project is using our :ref:`reference/git-integration:GitHub App`, you don't need to configure a webhook.
57+
For GitLab, and projects using our old GitHub integration, you need to make sure that your webhook is configured to send pull request events, not just push events.
5958
- Builds from pull requests have the same memory and time limitations
6059
:doc:`as regular builds </builds>`.
6160
- Additional formats like PDF aren't built in order to reduce build time.
@@ -67,8 +66,12 @@ Troubleshooting
6766
---------------
6867

6968
No new builds are started when I open a pull request
70-
The most common cause is that your repository's webhook is not configured to
71-
send Read the Docs pull request events. You'll need to re-sync your project's
69+
The most common cause when using GitHub is that your Read the Docs project is not
70+
:ref:`connected to the corresponding repository on GitHub <reference/git-integration:Connect a repository to an existing project>`.
71+
72+
If you are using our old GitHub integration,
73+
make sure that your repository's webhook is configured to
74+
send pull request events. You can re-sync your project's
7275
webhook integration to reconfigure the Read the Docs webhook.
7376

7477
To re-sync your project's webhook, go to your project's admin dashboard,

docs/user/intro/add-project.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Automatically add your project
1616
#. Go to your :term:`dashboard`.
1717
#. Click on :guilabel:`Add project`.
1818
#. Type the name of the repository you want to add and click on it.
19+
If you are using our :ref:`reference/git-integration:GitHub App`,
20+
make sure you have installed the :ref:`Read the Docs GitHub App <reference/git-integration:Troubleshooting>` in your repository.
1921
#. Click on :guilabel:`Continue`.
2022
#. Edit any of the pre-filled fields with information of the repository.
2123
#. Click on :guilabel:`Next`.

docs/user/reference/git-integration.rst

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ including the ones that were automatically created.
6464
Read the Docs incoming webhook
6565
------------------------------
6666

67+
.. note::
68+
69+
When using our :ref:`reference/git-integration:GitHub App`, Read the Docs subscribes to all required events.
70+
You don't need to create a webhook on your repository.
71+
6772
Accounts with |git_providers_and| integration automatically have Read the Docs' incoming :term:`webhook` configured on all Git repositories that are imported.
6873
Other setups can set up the webhook through :doc:`manual configuration </guides/setup/git-repo-manual>`.
6974

@@ -109,8 +114,8 @@ We also use the token to send back build statuses and preview URLs for :doc:`pul
109114

110115
.. note::
111116

112-
Access granted to Read the Docs can always be revoked.
113-
This is a function offered by all Git providers.
117+
Access granted to Read the Docs can always be revoked.
118+
This is a function offered by all Git providers.
114119

115120
Git provider integrations
116121
-------------------------
@@ -124,6 +129,12 @@ A Git provider integration is active through the authentication of the user that
124129
If this user is removed,
125130
make sure to verify and potentially recreate all Git integrations for the project.
126131

132+
.. note::
133+
134+
When using our :ref:`reference/git-integration:GitHub App`,
135+
If the original user who connected the repository to Read the Docs loses access to the project or repository,
136+
the GitHub App will still have access to the repository, and the integrations will continue to work.
137+
127138
Permissions for connected accounts
128139
----------------------------------
129140

@@ -165,6 +176,31 @@ so that you can log in to Read the Docs with your connected account credentials.
165176
but there isn't a more granular permission
166177
that only allows setting up SSH keys for read access.
167178

179+
.. tab:: GitHub App
180+
181+
Read the Docs requests the following permissions when connecting your Read the Docs account to our :ref:`GitHub App <reference/git-integration:GitHub App>`.
182+
183+
Account email addresses (read only)
184+
We ask for this so we can verify your email address and create a Read the Docs account.
185+
186+
When installing the Read the Docs GitHub App in a repository, you will be asked to grant the following permissions:
187+
188+
Repository permissions
189+
Commit statuses (read and write)
190+
This allows Read the Docs to report the status of the build to GitHub.
191+
Contents (read only)
192+
This allows Read the Docs to clone the repository and build the documentation.
193+
Metadata (read only)
194+
This allows Read the Docs to read the repository collaborators and the permissions they have on the repository.
195+
This is used to determine if the user can connect a repository to a Read the Docs project.
196+
Pull requests (read and write)
197+
This allows Read the Docs to subscribe to pull request events,
198+
and to create a comment on the pull request with information about the build.
199+
200+
Organization permissions
201+
Members (read only)
202+
This allows Read the Docs to read the organization members.
203+
168204
.. tab:: Bitbucket
169205

170206
We request permissions for:

0 commit comments

Comments
 (0)