From 0628887cd599662a2eba28af863c1ec99df5d6b9 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Fri, 17 May 2019 04:30:57 +0600 Subject: [PATCH 01/15] Pull Request Builder Design Doc Added --- docs/design/pr-builder.rst | 103 +++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 docs/design/pr-builder.rst diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst new file mode 100644 index 00000000000..845029fa1ad --- /dev/null +++ b/docs/design/pr-builder.rst @@ -0,0 +1,103 @@ +Design of Pull Request Builder +======================= + +Background +---------- + +This will focus on automatically building documentation for Pull Requests +on Read the Docs projects. This is one of the most requested feature of +Read the Docs. This document will serve as a design document +for discussing how to implement this features. + +Scope +----- + +- Receiving ``pull_request`` webhook event from Github +- Fetching data from pull requests. +- Making Pull Requests work like temporary ``Version`` +- Creating PR Versions when a pull request is opened and Triggering a build +- Setting PR version Life time +- Storing PR Version build Data. +- Deleting PR version and the build data +- Excluding PR Versions from Search Engines +- Serving PR Docs + +Fetching Data from Pull Requests +-------------------------------- + +We already get Pull requests event from Github webhooks. +We can utilize that to fetch data from pull requests. +when a ``pull_request`` event is triggered we can fetch +the data of that pull request. +We can fetch the pull request by doing something similar to travis-ci. +ie: ``git fetch origin +refs/pull//merge:`` + +Modeling Pull Requests as a type of version +------------------------------------------- + +Pull requests can be Treated as a Type of Temporary ``Version`` +We might consider adding a Boolean Field or ``VERSION_TYPES`` to the ``Version`` model. + +- If we go with Boolean Field we can add something like ``is_pull_request`` Field. +- If we go with ``VERSION_TYPES`` we can add something like ``pull_request`` alongside Tag and Branche. + +We also have to update the current ``Version`` model ``QuerySet`` to exclude the PR versions. +We have to add ``QuerySet`` for PR versions also. + +Creating Versions for Pull Requests +----------------------------------- + +If the Github webhook event is ``pull_request`` and action is ``opened`` +this means a pull request was opened in the projects repository. We can create a ``Version`` +from the Payload data and trigger a initial build for the version. A version will be created +whenever RTD receives a event like this. + +Triggering Build for New Commits in a Pull Request +-------------------------------------------------- + +We might want to trigger a new build for the PR version +if there is a new commit on the PR. + + +Storing Pull Request Docs +------------------------- + +We need to think about how and where to store data after a PR Version build is finished. +We can store the data in a blob storage. + +Deleting a PR Version +--------------------- + +We can delete a PR version when: + +- A pull request is ``closed``. Github Webhook event (Action: ``closed``, Merged: ``False``) +- A pull request is ``merged``. Github Webhook event (Action: ``closed``, Merged: ``True``) +- A PR Version has reached its life time. + +We might want to set a life time of a PR version in case we don't receive webhook +event for a pull request being closed/merged or if a PR is stale (not merged for a long time). +We need to delete the PR Version alongside the Build data from the blob storage. + +Excluding PR Versions from Search Engines +----------------------------------------- + +We should Exclude the PR Versions from Search Engines because it might cause problems +for RTD users as they might land to a pull request doc but not the original Project Docs. +This will cause confusion for the users. + +Serving PR Docs +--------------- + +We need to think about how we want to serve the PR Docs. +we could serve the PR builds using ```` namespace. +We can do something like: ``https://.readthedocs.io/en/pr//`` + +Related Issues +-------------- + +- `Autobuild Docs for Pull Requests`_ +- `Add travis-ci style pull request builder`_ + + +.. _Autobuild Docs for Pull Requests: https://github.com/rtfd/readthedocs.org/issues/5684 +.. _Add travis-ci style pull request builder: https://github.com/rtfd/readthedocs.org/issues/1340 From fff7a8167fcec152301dfaa80e707ff2fdbebb38 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Fri, 17 May 2019 04:35:52 +0600 Subject: [PATCH 02/15] fix --- docs/design/pr-builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 845029fa1ad..a3d32f182dc 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -1,5 +1,5 @@ Design of Pull Request Builder -======================= +============================== Background ---------- From a154fea3db5dd5070b80d283b2a947123f0f96a5 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Fri, 17 May 2019 15:04:13 +0600 Subject: [PATCH 03/15] PR Builder Design Doc Updated --- docs/design/pr-builder.rst | 84 ++++++++++++++++++++++++++------------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index a3d32f182dc..66a816eb7e9 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -4,10 +4,9 @@ Design of Pull Request Builder Background ---------- -This will focus on automatically building documentation for Pull Requests -on Read the Docs projects. This is one of the most requested feature of -Read the Docs. This document will serve as a design document -for discussing how to implement this features. +This will focus on automatically building documentation for Pull Requests on Read the Docs projects. +This is one of the most requested feature of Read the Docs. +This document will serve as a design document for discussing how to implement this features. Scope ----- @@ -15,9 +14,12 @@ Scope - Receiving ``pull_request`` webhook event from Github - Fetching data from pull requests. - Making Pull Requests work like temporary ``Version`` -- Creating PR Versions when a pull request is opened and Triggering a build - Setting PR version Life time -- Storing PR Version build Data. +- Excluding PR Versions from Elasticsearch Indexing +- Creating PR Versions when a pull request is opened and Triggering a build +- Triggering Builds on new PR commits +- Status reporting to Github +- Storing PR Version build Data - Deleting PR version and the build data - Excluding PR Versions from Search Engines - Serving PR Docs @@ -25,39 +27,64 @@ Scope Fetching Data from Pull Requests -------------------------------- -We already get Pull requests event from Github webhooks. +We already get Pull request events from Github webhooks. We can utilize that to fetch data from pull requests. -when a ``pull_request`` event is triggered we can fetch -the data of that pull request. +when a ``pull_request`` event is triggered we can fetch the data of that pull request. We can fetch the pull request by doing something similar to travis-ci. ie: ``git fetch origin +refs/pull//merge:`` -Modeling Pull Requests as a type of version +Modeling Pull Requests as a Type of Version ------------------------------------------- -Pull requests can be Treated as a Type of Temporary ``Version`` +Pull requests can be Treated as a Type of Temporary ``Version``. We might consider adding a Boolean Field or ``VERSION_TYPES`` to the ``Version`` model. - If we go with Boolean Field we can add something like ``is_pull_request`` Field. -- If we go with ``VERSION_TYPES`` we can add something like ``pull_request`` alongside Tag and Branche. +- If we go with ``VERSION_TYPES`` we can add something like ``pull_request`` alongside Tag and Branch. We also have to update the current ``Version`` model ``QuerySet`` to exclude the PR versions. We have to add ``QuerySet`` for PR versions also. +Excluding PR Versions from Elasticsearch Indexing +------------------------------------------------- + +We should exclude to PR Versions from being Indexed to Elasticsearch. +We need to update the queryset to exclude PR Versions. + Creating Versions for Pull Requests ----------------------------------- -If the Github webhook event is ``pull_request`` and action is ``opened`` -this means a pull request was opened in the projects repository. We can create a ``Version`` -from the Payload data and trigger a initial build for the version. A version will be created -whenever RTD receives a event like this. +If the Github webhook event is ``pull_request`` and action is ``opened``, +it means a pull request was opened in the projects repository. +We can create a ``Version`` from the Payload data and trigger a initial build for the version. +A version will be created whenever RTD receives an event like this. Triggering Build for New Commits in a Pull Request -------------------------------------------------- -We might want to trigger a new build for the PR version -if there is a new commit on the PR. +We might want to trigger a new build for the PR version if there is a new commit on the PR. + +Status Reporting to Github +-------------------------- + +We could send build status reports to Github. We could send if the build was Successful or Failed. +We can also send the build URL. By this we could show if the build passed or failed on Github something like travis-ci does. + +As we already have the ``repo:status`` scope on our OAuth App, +we can send the status report to Github using the Github Status API. +Sending the status report would be something like this: + +.. http:post:: /repos/:owner/:repo/statuses/:sha + +.. sourcecode:: js + + { + "state": "success", + "target_url": "", + "description": "The build succeeded!", + "context": "continuous-documentation/read-the-docs" + } Storing Pull Request Docs ------------------------- @@ -72,25 +99,32 @@ We can delete a PR version when: - A pull request is ``closed``. Github Webhook event (Action: ``closed``, Merged: ``False``) - A pull request is ``merged``. Github Webhook event (Action: ``closed``, Merged: ``True``) -- A PR Version has reached its life time. +- A PR Version has reached its life time + +We might want to set a life time of a PR version in case: + +- We don't receive webhook event for a pull request being closed/merged +- If a PR is stale (not merged for a long time). -We might want to set a life time of a PR version in case we don't receive webhook -event for a pull request being closed/merged or if a PR is stale (not merged for a long time). We need to delete the PR Version alongside the Build data from the blob storage. Excluding PR Versions from Search Engines ----------------------------------------- -We should Exclude the PR Versions from Search Engines because it might cause problems -for RTD users as they might land to a pull request doc but not the original Project Docs. +We should Exclude the PR Versions from Search Engines, +because it might cause problems for RTD users. +As users might land to a pull request doc but not the original Project Docs. This will cause confusion for the users. Serving PR Docs --------------- We need to think about how we want to serve the PR Docs. -we could serve the PR builds using ```` namespace. -We can do something like: ``https://.readthedocs.io/en/pr//`` + +- We could serve the PR Docs from another Domain. +- We could serve the PR Docs using ```` namespace on the same Domain. + ``https://.readthedocs.io/en/pr//`` + Related Issues -------------- From 2f348828b6fbdf43984eb36598996188d799c8b0 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Fri, 17 May 2019 15:18:21 +0600 Subject: [PATCH 04/15] code block update --- docs/design/pr-builder.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 66a816eb7e9..aefd5ec8f0e 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -77,14 +77,14 @@ Sending the status report would be something like this: .. http:post:: /repos/:owner/:repo/statuses/:sha -.. sourcecode:: js - - { - "state": "success", - "target_url": "", - "description": "The build succeeded!", - "context": "continuous-documentation/read-the-docs" - } +.. code:: json + + { + "state": "success", + "target_url": "", + "description": "The build succeeded!", + "context": "continuous-documentation/read-the-docs" + } Storing Pull Request Docs ------------------------- From 8198de9d9b87158cdeae9e72003257eb82f6b959 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Sun, 19 May 2019 04:03:40 +0600 Subject: [PATCH 05/15] Added Footer API changes to docs --- docs/design/pr-builder.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index aefd5ec8f0e..8bbcb5426bb 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -23,6 +23,7 @@ Scope - Deleting PR version and the build data - Excluding PR Versions from Search Engines - Serving PR Docs +- Update the Footer API Fetching Data from Pull Requests -------------------------------- @@ -125,6 +126,14 @@ We need to think about how we want to serve the PR Docs. - We could serve the PR Docs using ```` namespace on the same Domain. ``https://.readthedocs.io/en/pr//`` +Update the Footer API +--------------------- + +We need to update the Footer API to reflect the changes. +We might want to have a way to show that if this is a PR Build on the Footer. + +- For PR Builds we might want to show a Visual hint. (The footer color might be Red). +- For regular project docs we should remove the PR Versions from the version list of the Footer. Related Issues -------------- From 29f549ecc9a0a259d0b682c8833bf488a343e75d Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Fri, 24 May 2019 23:04:56 +0600 Subject: [PATCH 06/15] PR Builder Design Doc Update --- docs/design/pr-builder.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 8bbcb5426bb..13948458f34 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -23,7 +23,8 @@ Scope - Deleting PR version and the build data - Excluding PR Versions from Search Engines - Serving PR Docs -- Update the Footer API +- Updating the Footer API +- Adding Warning Banner to Docs Fetching Data from Pull Requests -------------------------------- @@ -56,7 +57,7 @@ Creating Versions for Pull Requests ----------------------------------- If the Github webhook event is ``pull_request`` and action is ``opened``, -it means a pull request was opened in the projects repository. +this means a pull request was opened in the projects repository. We can create a ``Version`` from the Payload data and trigger a initial build for the version. A version will be created whenever RTD receives an event like this. @@ -64,6 +65,8 @@ Triggering Build for New Commits in a Pull Request -------------------------------------------------- We might want to trigger a new build for the PR version if there is a new commit on the PR. +If the Github webhook event is ``pull_request`` and action is ``synchronize``, +this means a new commit was added to the pull request. Status Reporting to Github -------------------------- @@ -124,17 +127,25 @@ We need to think about how we want to serve the PR Docs. - We could serve the PR Docs from another Domain. - We could serve the PR Docs using ```` namespace on the same Domain. - ``https://.readthedocs.io/en/pr//`` -Update the Footer API + - Using ``pr`` as the version slug ``https://.readthedocs.io//pr/`` + - Using ``pr`` subdomain ``https://pr..readthedocs.io//`` + + +Updating the Footer API --------------------- We need to update the Footer API to reflect the changes. We might want to have a way to show that if this is a PR Build on the Footer. -- For PR Builds we might want to show a Visual hint. (The footer color might be Red). - For regular project docs we should remove the PR Versions from the version list of the Footer. +Adding Warning Banner to Docs +----------------------------- + +We need to add a warning banner to the PR Version Docs to let the users know that this is a Draft/PR version. +We can use a sphinx extension that we will force to install on the PR Versions to add the warning banner. + Related Issues -------------- From bafc77f317c4cdf48470217c3428563dd024ffe5 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Fri, 24 May 2019 23:24:34 +0600 Subject: [PATCH 07/15] doc lint fix --- docs/design/pr-builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 13948458f34..5c23a08f861 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -133,7 +133,7 @@ We need to think about how we want to serve the PR Docs. Updating the Footer API ---------------------- +----------------------- We need to update the Footer API to reflect the changes. We might want to have a way to show that if this is a PR Build on the Footer. From ad806754dd98cd215be603c7b494b98c46093c13 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Tue, 28 May 2019 19:14:15 +0600 Subject: [PATCH 08/15] doc serving url design updated --- docs/design/pr-builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 5c23a08f861..6d1d4762529 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -128,7 +128,7 @@ We need to think about how we want to serve the PR Docs. - We could serve the PR Docs from another Domain. - We could serve the PR Docs using ```` namespace on the same Domain. - - Using ``pr`` as the version slug ``https://.readthedocs.io//pr/`` + - Using ``pr-`` as the version slug ``https://.readthedocs.io//pr-/`` - Using ``pr`` subdomain ``https://pr..readthedocs.io//`` From c3500efd137bf1af9824bbc0356c5c25cb28e36f Mon Sep 17 00:00:00 2001 From: Maksudul Haque Date: Thu, 30 May 2019 15:35:30 +0600 Subject: [PATCH 09/15] Update docs/design/pr-builder.rst Co-Authored-By: Eric Holscher <25510+ericholscher@users.noreply.github.com> --- docs/design/pr-builder.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 6d1d4762529..8a621e47abc 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -11,6 +11,11 @@ This document will serve as a design document for discussing how to implement th Scope ----- +.. contents:: + :local: + :depth: 1 + :backlinks: none + - Receiving ``pull_request`` webhook event from Github - Fetching data from pull requests. - Making Pull Requests work like temporary ``Version`` From f1ff2720851259a43450dc7210ea016f056ac10c Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Thu, 30 May 2019 15:42:43 +0600 Subject: [PATCH 10/15] removed PR Version Delete doc --- docs/design/pr-builder.rst | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 8a621e47abc..28229e5ba39 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -25,7 +25,6 @@ Scope - Triggering Builds on new PR commits - Status reporting to Github - Storing PR Version build Data -- Deleting PR version and the build data - Excluding PR Versions from Search Engines - Serving PR Docs - Updating the Footer API @@ -101,22 +100,6 @@ Storing Pull Request Docs We need to think about how and where to store data after a PR Version build is finished. We can store the data in a blob storage. -Deleting a PR Version ---------------------- - -We can delete a PR version when: - -- A pull request is ``closed``. Github Webhook event (Action: ``closed``, Merged: ``False``) -- A pull request is ``merged``. Github Webhook event (Action: ``closed``, Merged: ``True``) -- A PR Version has reached its life time - -We might want to set a life time of a PR version in case: - -- We don't receive webhook event for a pull request being closed/merged -- If a PR is stale (not merged for a long time). - -We need to delete the PR Version alongside the Build data from the blob storage. - Excluding PR Versions from Search Engines ----------------------------------------- From b6fd291f4bd177ae583e4ae1dd84d9c3dc64eb5e Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Mon, 3 Jun 2019 16:01:58 +0600 Subject: [PATCH 11/15] PR Builder Design Doc Updated --- docs/design/pr-builder.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 28229e5ba39..f12944263b8 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -19,10 +19,9 @@ Scope - Receiving ``pull_request`` webhook event from Github - Fetching data from pull requests. - Making Pull Requests work like temporary ``Version`` -- Setting PR version Life time - Excluding PR Versions from Elasticsearch Indexing - Creating PR Versions when a pull request is opened and Triggering a build -- Triggering Builds on new PR commits +- Triggering Builds on new commits on a PR - Status reporting to Github - Storing PR Version build Data - Excluding PR Versions from Search Engines @@ -43,9 +42,8 @@ Modeling Pull Requests as a Type of Version ------------------------------------------- Pull requests can be Treated as a Type of Temporary ``Version``. -We might consider adding a Boolean Field or ``VERSION_TYPES`` to the ``Version`` model. +We might consider adding a ``VERSION_TYPES`` to the ``Version`` model. -- If we go with Boolean Field we can add something like ``is_pull_request`` Field. - If we go with ``VERSION_TYPES`` we can add something like ``pull_request`` alongside Tag and Branch. We also have to update the current ``Version`` model ``QuerySet`` to exclude the PR versions. From a8c84f03c84cbd236907614fcab7a31efb545246 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Tue, 4 Jun 2019 15:49:24 +0600 Subject: [PATCH 12/15] Version manager added to PR Builder Design Doc --- docs/design/pr-builder.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index f12944263b8..9af55398ce1 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -46,8 +46,12 @@ We might consider adding a ``VERSION_TYPES`` to the ``Version`` model. - If we go with ``VERSION_TYPES`` we can add something like ``pull_request`` alongside Tag and Branch. -We also have to update the current ``Version`` model ``QuerySet`` to exclude the PR versions. -We have to add ``QuerySet`` for PR versions also. +We should add ``Version`` Model Managers for PR Versions and Regular Versions. +The proposed names for PR Version Manager and Regular Version Manger are ``external`` and ``internal``. + +We can then have ``Version.internal.all()`` to get all regular versions, +``Version.external.all()`` to get all PR versions. + Excluding PR Versions from Elasticsearch Indexing ------------------------------------------------- From f605ba785f2ed5263ba8a61d500623e6dd391aa6 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Sun, 9 Jun 2019 00:25:50 +0600 Subject: [PATCH 13/15] PR Builds Tab Design added --- docs/design/pr-builder.rst | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index 9af55398ce1..b77b2f9dae8 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -15,19 +15,20 @@ Scope :local: :depth: 1 :backlinks: none - -- Receiving ``pull_request`` webhook event from Github -- Fetching data from pull requests. + - Making Pull Requests work like temporary ``Version`` - Excluding PR Versions from Elasticsearch Indexing +- Updating the Footer API +- Adding a ``PR Builds`` Tab in the Project Dashboard +- Adding Warning Banner to Docs +- Serving PR Docs +- Excluding PR Versions from Search Engines +- Receiving ``pull_request`` webhook event from Github +- Fetching data from pull requests +- Storing PR Version build Data - Creating PR Versions when a pull request is opened and Triggering a build - Triggering Builds on new commits on a PR - Status reporting to Github -- Storing PR Version build Data -- Excluding PR Versions from Search Engines -- Serving PR Docs -- Updating the Footer API -- Adding Warning Banner to Docs Fetching Data from Pull Requests -------------------------------- @@ -59,6 +60,12 @@ Excluding PR Versions from Elasticsearch Indexing We should exclude to PR Versions from being Indexed to Elasticsearch. We need to update the queryset to exclude PR Versions. +Adding a PR Builds Tab in the Project Dashboard +----------------------------------------------- + +We can add a Tab in the project dashboard that will listout the PR Builds of that project. +We can name it ``PR Builds``. + Creating Versions for Pull Requests ----------------------------------- From 9f48d3b5a958a02e791d0a77cc5c27606eb435f2 Mon Sep 17 00:00:00 2001 From: saadmk11 Date: Sun, 9 Jun 2019 14:05:13 +0600 Subject: [PATCH 14/15] ordering updated and footer API proposal updated --- docs/design/pr-builder.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index b77b2f9dae8..dadb570b974 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -18,8 +18,8 @@ Scope - Making Pull Requests work like temporary ``Version`` - Excluding PR Versions from Elasticsearch Indexing -- Updating the Footer API - Adding a ``PR Builds`` Tab in the Project Dashboard +- Updating the Footer API - Adding Warning Banner to Docs - Serving PR Docs - Excluding PR Versions from Search Engines @@ -47,12 +47,15 @@ We might consider adding a ``VERSION_TYPES`` to the ``Version`` model. - If we go with ``VERSION_TYPES`` we can add something like ``pull_request`` alongside Tag and Branch. -We should add ``Version`` Model Managers for PR Versions and Regular Versions. -The proposed names for PR Version Manager and Regular Version Manger are ``external`` and ``internal``. +We should add ``Version`` and ``Build`` Model Managers for PR and Regular Versions and Builds. +The proposed names for PR and Regular Version and Build Mangers are ``external`` and ``internal``. -We can then have ``Version.internal.all()`` to get all regular versions, +We can then use ``Version.internal.all()`` to get all regular versions, ``Version.external.all()`` to get all PR versions. +We can then use ``Build.internal.all()`` to get all regular version builds, +``Build.external.all()`` to get all PR version builds. + Excluding PR Versions from Elasticsearch Indexing ------------------------------------------------- @@ -136,6 +139,7 @@ We need to update the Footer API to reflect the changes. We might want to have a way to show that if this is a PR Build on the Footer. - For regular project docs we should remove the PR Versions from the version list of the Footer. +- We might want to send ``is_pr`` data with the Footer API response. Adding Warning Banner to Docs ----------------------------- From 0b1686d5bf2ee3e4007e02e470d9fae9a1bb9fb5 Mon Sep 17 00:00:00 2001 From: Eric Holscher <25510+ericholscher@users.noreply.github.com> Date: Wed, 12 Jun 2019 11:52:47 -0700 Subject: [PATCH 15/15] Remove silly contents, since I was wrong :) --- docs/design/pr-builder.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/design/pr-builder.rst b/docs/design/pr-builder.rst index dadb570b974..2cb8fb43736 100644 --- a/docs/design/pr-builder.rst +++ b/docs/design/pr-builder.rst @@ -11,11 +11,6 @@ This document will serve as a design document for discussing how to implement th Scope ----- -.. contents:: - :local: - :depth: 1 - :backlinks: none - - Making Pull Requests work like temporary ``Version`` - Excluding PR Versions from Elasticsearch Indexing - Adding a ``PR Builds`` Tab in the Project Dashboard