Skip to content

Commit 80b2fa1

Browse files
agjohnsonstsewd
andauthored
Spruce up docs on pull request builds (#9177)
* Spruce up docs on pull request builds I keep helping users with the support request around webhooks missing the pull request event, so wanted to clarify a bit here. I also took the opportunity to add some clearer language to the rest of the page, and resturcture a few things to improve the information flow. I also opened #9176 to deal with this in a programmatic way, but figured we could at least communicate the issue better for now. * Update docs/user/pull-requests.rst Co-authored-by: Santos Gallegos <[email protected]> * Consolidate seealso blocks Co-authored-by: Santos Gallegos <[email protected]>
1 parent cf48c6a commit 80b2fa1

File tree

1 file changed

+64
-35
lines changed

1 file changed

+64
-35
lines changed

docs/user/pull-requests.rst

+64-35
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,49 @@
11
Preview Documentation from Pull Requests
22
========================================
33

4-
Read the Docs allows you to build and preview your documentation from pull requests.
5-
To enable this feature:
6-
7-
#. Go to your project dashboard
8-
#. Go to :guilabel:`Admin > Advanced settings`
9-
#. Enable the :guilabel:`Build pull requests for this project` option
10-
#. Click on :guilabel:`Save`
4+
Your project can be configured to build and host documentation for every new
5+
pull request. Previewing changes to your documentation during review makes it
6+
easier to catch documentation formatting and display issues introduced in pull
7+
requests.
118

129
Features
1310
--------
1411

1512
Build on pull request events
16-
We create and build a new version when a pull request is open,
17-
and when a new commit has been pushed.
13+
We create and build a new version when a pull request is opened,
14+
and rebuild the version whenever a new commit is pushed.
1815

1916
Build status report
20-
When a build is triggered, a build pending notification is sent with a link to the build log.
21-
When the build finishes we send a success notification with the link to the preview or a failure notification with a link to the build log.
17+
Your project's pull request build status will show as one of your pull
18+
request's checks. This status will update as the build is running, and will
19+
show a success or failure status when the build completes.
20+
21+
.. figure:: /_static/images/github-build-status-reporting.gif
22+
:align: center
23+
:alt: GitHub build status reporting for pull requests.
24+
:figwidth: 80%
25+
26+
GitHub build status reporting
2227

2328
Warning banner
24-
A warning banner is shown at the top of the documentation
25-
to let users know that this isn't the main documentation for the project.
29+
A warning banner is shown at the top of documentation pages
30+
to let readers know that this version isn't the main version for the project.
2631

27-
.. note:: Warning banners are available only for :doc:`Sphinx projects </intro/getting-started-with-sphinx>`.
32+
.. note:: Warning banners are available only for :doc:`Sphinx projects </intro/getting-started-with-sphinx>`.
2833

29-
.. figure:: /_static/images/github-build-status-reporting.gif
30-
:align: center
31-
:alt: GitHub build status reporting for pull requests.
32-
:figwidth: 80%
34+
Configuration
35+
-------------
3336

34-
GitHub build status reporting
37+
To enable this feature for your project,
38+
your Read the Docs account needs to be connected to an account with a supported VCS provider.
39+
See `Limitations`_ for more information.
40+
41+
If your account is already connected:
42+
43+
#. Go to your project dashboard
44+
#. Go to :guilabel:`Admin`, then :guilabel:`Advanced settings`
45+
#. Enable the :guilabel:`Build pull requests for this project` option
46+
#. Click on :guilabel:`Save`
3547

3648
Privacy levels
3749
--------------
@@ -40,43 +52,60 @@ Privacy levels
4052

4153
Privacy levels are only supported on :doc:`/commercial/index`.
4254

43-
By default all docs built from pull requests are private.
55+
By default, all docs built from pull requests are private.
4456
To change their privacy level:
4557

4658
#. Go to your project dashboard
47-
#. Go to :guilabel:`Admin > Advanced settings`
59+
#. Go to :guilabel:`Admin`, then :guilabel:`Advanced settings`
4860
#. Select your option in :guilabel:`Privacy level of builds from pull requests`
4961
#. Click on :guilabel:`Save`
5062

51-
Privacy levels work the same way as for :ref:`normal versions <versions:privacy levels>`.
63+
Privacy levels work the same way as :ref:`normal versions <versions:privacy levels>`.
5264

5365
Limitations
5466
-----------
5567

68+
- Only available for **GitHub** and **GitLab** currently. Bitbucket is not yet supported.
69+
- To enable this feature, your Read the Docs account needs to be connected to an
70+
account with your VCS provider.
5671
- Builds from pull requests have the same memory and time limitations
5772
:doc:`as regular builds </builds>`.
58-
- Only available for GitHub and GitLab.
59-
- Additional formats like PDF and EPUB aren't built to produce results quicker.
60-
- Searches will default to the default experience for your tool.
73+
- Additional formats like PDF and EPUB aren't built, to reduce build time.
74+
- Search queries will default to the default experience for your tool.
6175
This is a feature we plan to add,
6276
but don't want to overwhelm our search indexes used in production.
6377
- The built documentation is kept for 90 days after the pull request has been closed or merged.
6478

6579
Troubleshooting
6680
---------------
6781

68-
Pull Requests builds are not triggered
69-
We only support GitHub and GitLab currently.
70-
You need to make sure that your Read the Docs account is connected with that provider.
71-
You can check this by going to your :guilabel:`Username dropdown` > :guilabel:`Settings` > :guilabel:`Connected Services`.
82+
No new builds are started when I open a pull request
83+
The most common cause is that your repository's webhook is not configured to
84+
send Read the Docs pull request events. You'll need to re-sync your project's
85+
webhook integration to reconfigure the Read the Docs webhook.
86+
87+
To resync your project's webhook, go to your project's admin dashboard,
88+
:guilabel:`Integrations`, and then select the webhook integration for your
89+
provider. Follow the directions on to re-sync the webhook, or create a new
90+
webhook integration.
91+
92+
You may also notice this behavior if your Read the Docs account is not
93+
connected to your VCS provider account, or if it needs to be reconnected.
94+
You can (re)connect your account by going to your :guilabel:`Username dropdown`,
95+
:guilabel:`Settings`, then to :guilabel:`Connected Services`.
96+
7297

7398
Build status is not being reported to your VCS provider
74-
You need to make sure that you have granted access to the Read the Docs
75-
OAuth App to your personal or organization GitHub account.
76-
Learn more about this in our :ref:`github-permission-troubleshooting` section.
99+
If opening a pull request does start a new build, but the build status is not
100+
being updated with your VCS provider, then your connected account may have out
101+
dated or insufficient permisisons.
102+
103+
Make sure that you have granted access to the Read the Docs `OAuth App`_ for
104+
your personal or organization GitHub account. You can also try reconnecting
105+
your account with your VCS provider.
77106

78-
Also make sure your webhook integration is properly setup
79-
to handle events related to pull requests. You can setup or ``re-sync`` the integration from your projects admin dashboard.
80-
Learn more about setting up integrations from our :doc:`integrations documentation </integrations>`.
107+
.. seealso::
108+
- :ref:`integrations:Debugging webhooks`
109+
- :ref:`github-permission-troubleshooting`
81110

82111
.. _OAuth App: https://github.com/settings/applications

0 commit comments

Comments
 (0)