1
- Design of Pull Request Builder
1
+ Design of pull request builder
2
2
==============================
3
3
4
4
Background
25
25
- Triggering Builds on new commits on a PR
26
26
- Status reporting to Github
27
27
28
- Fetching Data from Pull Requests
28
+ Fetching data from pull requests
29
29
--------------------------------
30
30
31
31
We already get Pull request events from Github webhooks.
@@ -34,7 +34,7 @@ when a ``pull_request`` event is triggered we can fetch the data of that pull re
34
34
We can fetch the pull request by doing something similar to travis-ci.
35
35
ie: ``git fetch origin +refs/pull/<pr_number>/merge: ``
36
36
37
- Modeling Pull Requests as a Type of Version
37
+ Modeling pull requests as a type of version
38
38
-------------------------------------------
39
39
40
40
Pull requests can be Treated as a Type of Temporary ``Version ``.
@@ -52,34 +52,34 @@ We can then use ``Build.internal.all()`` to get all regular version builds,
52
52
``Build.external.all() `` to get all PR version builds.
53
53
54
54
55
- Excluding PR Versions from Elasticsearch Indexing
55
+ Excluding PR versions from Elasticsearch indexing
56
56
-------------------------------------------------
57
57
58
58
We should exclude to PR Versions from being Indexed to Elasticsearch.
59
59
We need to update the queryset to exclude PR Versions.
60
60
61
- Adding a PR Builds Tab in the Project Dashboard
61
+ Adding a PR builds tab in the project dashboard
62
62
-----------------------------------------------
63
63
64
64
We can add a Tab in the project dashboard that will listout the PR Builds of that project.
65
65
We can name it ``PR Builds ``.
66
66
67
- Creating Versions for Pull Requests
67
+ Creating versions for pull requests
68
68
-----------------------------------
69
69
70
70
If the Github webhook event is ``pull_request `` and action is ``opened ``,
71
71
this means a pull request was opened in the projects repository.
72
72
We can create a ``Version `` from the Payload data and trigger a initial build for the version.
73
73
A version will be created whenever RTD receives an event like this.
74
74
75
- Triggering Build for New Commits in a Pull Request
75
+ Triggering build for new commits in a pull request
76
76
--------------------------------------------------
77
77
78
78
We might want to trigger a new build for the PR version if there is a new commit on the PR.
79
79
If the Github webhook event is ``pull_request `` and action is ``synchronize ``,
80
80
this means a new commit was added to the pull request.
81
81
82
- Status Reporting to Github
82
+ Status reporting to GitHub
83
83
--------------------------
84
84
85
85
We could send build status reports to Github. We could send if the build was Successful or Failed.
@@ -101,21 +101,21 @@ Sending the status report would be something like this:
101
101
"context" : " continuous-documentation/read-the-docs"
102
102
}
103
103
104
- Storing Pull Request Docs
104
+ Storing pull request docs
105
105
-------------------------
106
106
107
107
We need to think about how and where to store data after a PR Version build is finished.
108
108
We can store the data in a blob storage.
109
109
110
- Excluding PR Versions from Search Engines
110
+ Excluding PR versions from search engines
111
111
-----------------------------------------
112
112
113
113
We should Exclude the PR Versions from Search Engines,
114
114
because it might cause problems for RTD users.
115
115
As users might land to a pull request doc but not the original Project Docs.
116
116
This will cause confusion for the users.
117
117
118
- Serving PR Docs
118
+ Serving PR docs
119
119
---------------
120
120
121
121
We need to think about how we want to serve the PR Docs.
@@ -136,13 +136,13 @@ We might want to have a way to show that if this is a PR Build on the Footer.
136
136
- For regular project docs we should remove the PR Versions from the version list of the Footer.
137
137
- We might want to send ``is_pr `` data with the Footer API response.
138
138
139
- Adding Warning Banner to Docs
139
+ Adding warning banner to Docs
140
140
-----------------------------
141
141
142
142
We need to add a warning banner to the PR Version Docs to let the users know that this is a Draft/PR version.
143
143
We can use a sphinx extension that we will force to install on the PR Versions to add the warning banner.
144
144
145
- Related Issues
145
+ Related issues
146
146
--------------
147
147
148
148
- `Autobuild Docs for Pull Requests `_
0 commit comments