1
1
---
2
2
title : Submitting content
3
3
description :
4
- Learn how to submit new or changed content using the GitHub UI or a local
4
+ Learn how to submit new or changed content using the GitHub UI or from a local
5
5
fork.
6
6
aliases : [new-content]
7
7
weight : 15
8
8
---
9
9
10
- To contribute new or improve existing documentation content , submit a [ pull
11
- request ] [ PR ] (PR):
10
+ To contribute new or improve existing documentation, submit a [ pull request ] [ PR ]
11
+ (PR):
12
12
13
- - If your change is small, or you're unfamiliar with Git, see
14
- [ Changes using GitHub] ( #changes-using-github ) to learn how to edit a page.
15
- - If your changes are large, see [ Work from a local fork] ( #fork-the-repo ) to
16
- learn how to make changes locally on your computer.
13
+ - If your change is small, or you're unfamiliar with [ Git] , see
14
+ [ Using GitHub] ( #changes-using-github ) to learn how to edit a page.
15
+ - Otherwise, see [ Work from a local fork] ( #fork-the-repo ) to learn how to make
16
+ changes in your own local development environment.
17
+
18
+ {{% alert title="Contributor License Agreement (CLA)" color=warning %}}
19
+
20
+ All contributors are required to [ sign a Contributor License Agreement
21
+ (CLA)] [ CLA ] before changes can be reviewed and merged.
22
+
23
+ [ CLA ] : ../prerequisites/#cla
24
+
25
+ {{% /alert %}}
17
26
18
27
{{% alert title="Tip: Draft status" %}}
19
28
@@ -47,20 +56,13 @@ class first,second white
47
56
48
57
_ Figure 1. Contributing new content._
49
58
50
- ## Changes using GitHub {#changes-using-github}
51
-
52
- If you're less experienced with Git workflows, here's an easier method of
53
- creating and submitting a pull request. Figure 2 outlines the steps and the
54
- details follow.
55
-
56
- {{% alert title="Contributor License Agreement (CLA)" color=warning %}}
57
-
58
- All contributors are required to [ sign a Contributor License Agreement
59
- (CLA)] [ CLA ] before changes can be approved and merged.
59
+ ## Using GitHub {#changes-using-github}
60
60
61
- [ CLA ] : ../prerequisites/#cla
61
+ ### Edit and submit changes from your browser {#page-edit-from-browser}
62
62
63
- {{% /alert %}}
63
+ If you're less experienced with Git workflows, here's an easier method of
64
+ preparing and opening a new pull request (PR). Figure 2 outlines the steps and
65
+ the details follow.
64
66
65
67
``` mermaid
66
68
flowchart LR
@@ -124,21 +126,47 @@ If a reviewer asks you to make changes:
124
126
When your review is complete, a reviewer merges your PR and your changes goes
125
127
live a few minutes later.
126
128
127
- {{% alert title="Tip" %}}
129
+ ### Fixing PR check failures {#fixing-prs-in-github}
130
+
131
+ After you've submitted a PR, GitHub runs some build checks. Certain check
132
+ failures, like formatting issues, can be fixed automatically.
133
+
134
+ Add the following comment to your PR:
135
+
136
+ ``` text
137
+ /fix:all
138
+ ```
139
+
140
+ This will trigger the OpenTelemetry bot to try to fix build issues. Or you can
141
+ issue one of the following fix commands to address a specific failure:
142
+
143
+ ``` text
144
+ fix:dict
145
+ fix:expired
146
+ fix:filenames
147
+ fix:format
148
+ fix:htmltest-config
149
+ fix:i18n
150
+ fix:markdown
151
+ fix:refcache
152
+ fix:submodule
153
+ fix:text
154
+ ```
155
+
156
+ {{% alert title="Pro tip" %}}
128
157
129
- Comment ` / fix:format ` on your pull request to trigger an automated check for
130
- formatting issues .
158
+ You can also run the ` fix ` commands locally. For the complete list of fix
159
+ commands, run ` npm run -s '_list:fix:*' ` .
131
160
132
161
{{% /alert %}}
133
162
134
- ## Work from a local fork {#fork-the-repo}
163
+ ## Working locally {#fork-the-repo}
135
164
136
165
If you're more experienced with Git, or if your changes are larger than a few
137
166
lines, work from a local fork.
138
167
139
- Make sure you have
140
- [ git] ( https://git-scm.com/book/en/v2/Getting-Started-Installing-Git ) installed
141
- on your computer. You can also use a user interface for Git.
168
+ Make sure you have [ ` git ` installed] on your computer. You can also use a user
169
+ interface for Git.
142
170
143
171
Figure 3 shows the steps to follow when you work from a local fork. The details
144
172
for each step follow.
@@ -170,14 +198,14 @@ class changes,changes2 white
170
198
171
199
_ Figure 3. Working from a local fork to make your changes._
172
200
173
- ### Fork the opentelemetry.io repository
201
+ ### Fork the repository
174
202
175
203
1 . Navigate to the
176
204
[ ` opentelemetry.io ` ] ( https://github.com/open-telemetry/opentelemetry.io/ )
177
205
repository.
178
206
1 . Select ** Fork** .
179
207
180
- ### Create a local clone and set the upstream
208
+ ### Clone and set upstream
181
209
182
210
1 . In a terminal window, clone your fork and install the requirements:
183
211
@@ -280,7 +308,7 @@ When you are ready to submit a pull request, commit your changes.
280
308
281
309
1 . Once the changes are pushed, GitHub lets you know that you can create a PR.
282
310
283
- ### Open a pull request from your fork {#open-a-pr}
311
+ ### Open a new PR {#open-a-pr}
284
312
285
313
Figure 4 shows the steps to open a PR from your fork to
286
314
[ opentelemetry.io] ( https://github.com/open-telemetry/opentelemetry.io ) .
@@ -346,7 +374,7 @@ using [Netlify](https://www.netlify.com/).
346
374
347
375
Other checks might also fail. See the [ list of all PR checks] ( ../pr-checks ) .
348
376
349
- ### Fix content issues automatically
377
+ ### Fix issues {#fix-issues}
350
378
351
379
Before submitting a change to the repository, run the following command and (i)
352
380
address any reported issues, (ii) commit any files changed by the script:
@@ -365,7 +393,7 @@ npm run fix:all # May update files
365
393
To list available NPM scripts, run ` npm run ` . See [ PR checks] ( ../pr-checks ) for
366
394
more information on pull request checks and how to fix errors automatically.
367
395
368
- ### Preview your changes locally {#preview-locally}
396
+ ### Preview your changes {#preview-locally}
369
397
370
398
Preview your changes locally before pushing them or opening a pull request. A
371
399
preview lets you catch build errors or markdown formatting problems.
@@ -376,7 +404,7 @@ To build and serve the site locally with Hugo, run the following command:
376
404
npm run serve
377
405
```
378
406
379
- Navigate to ` http://localhost:1313 ` in your web browser to see the local
407
+ Navigate to < http://localhost:1313 > in your web browser to see the local
380
408
preview. Hugo watches for changes and rebuilds the site as needed.
381
409
382
410
To stop the local Hugo instance, go back to the terminal and type ` Ctrl+C ` , or
@@ -513,4 +541,6 @@ Pull requests are merged when they comply with the following criteria:
513
541
[ dashboard ] : https://app.netlify.com/sites/opentelemetry/overview
514
542
[ deploy preview] :
515
543
https://www.netlify.com/blog/2016/07/20/introducing-deploy-previews-in-netlify/
544
+ [ Git ] : https://docs.github.com/en/get-started/using-git/about-git
545
+ [ `git` installed ] : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
516
546
[ PR ] : https://docs.github.com/en/pull-requests
0 commit comments