You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contribute/changelog.md
+34-14Lines changed: 34 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,27 +2,15 @@
2
2
3
3
By adding a file for each notable change and grouping them into bundles, you can ultimately generate release documention with a consistent layout for all your products.
4
4
5
-
1. Create changelogs with the `docs-builder changelog add` command.
6
-
2.[Create changelog bundles](#changelog-bundle) with the `docs-builder changelog bundle` command. For example, create a bundle for the pull requests that are included in a product release.
7
-
3.[Create documentation](#render-changelogs) with the `docs-builder changelog render` command.
8
-
9
-
For more information about running `docs-builder`, go to [Contribute locally](https://www.elastic.co/docs/contribute-docs/locally).
10
-
11
-
:::{note}
12
-
This command is associated with an ongoing release docs initiative.
13
-
Additional workflows are still to come for updating and generating documentation from changelogs.
Some of the fields in the schema accept only a specific set of values:
24
-
25
12
:::{important}
13
+
Some of the fields in the schema accept only a specific set of values:
26
14
27
15
- Product values must exist in [products.yml](https://github.com/elastic/docs-builder/blob/main/config/products.yml). Invalid products will cause the `docs-builder changelog add` command to fail.
28
16
- Type, subtype, and lifecycle values must match the available values defined in [ChangelogConfiguration.cs](https://github.com/elastic/docs-builder/blob/main/src/services/Elastic.Documentation.Services/Changelog/ChangelogConfiguration.cs). Invalid values will cause the `docs-builder changelog add` command to fail.
@@ -36,6 +24,15 @@ To use the `docs-builder changelog` commands in your development workflow:
36
24
1. Optional: Add labels to your GitHub pull requests to indicate that they are not notable and should not generate changelogs. For example, `non-issue` or `release_notes:skip`.
37
25
1.[Configure changelog settings](#changelog-settings) to correctly interpret your PR labels.
38
26
1.[Create changelogs](#changelog-add) with the `docs-builder changelog add` command.
27
+
1.[Create changelog bundles](#changelog-bundle) with the `docs-builder changelog bundle` command. For example, create a bundle for the pull requests that are included in a product release.
28
+
1.[Create documentation](#render-changelogs) with the `docs-builder changelog render` command.
29
+
30
+
For more information about running `docs-builder`, go to [Contribute locally](https://www.elastic.co/docs/contribute-docs/locally).
31
+
32
+
:::{note}
33
+
This command is associated with an ongoing release docs initiative.
34
+
Additional workflows are still to come for updating and generating documentation from changelogs.
35
+
:::
39
36
40
37
## Create a changelog configuration file [changelog-settings]
41
38
@@ -115,7 +112,12 @@ Refer to [changelog.yml.example](https://github.com/elastic/docs-builder/blob/ma
115
112
## Create changelog files [changelog-add]
116
113
117
114
You can use the `docs-builder changelog add` command to create a changelog file.
118
-
For up-to-date details, use the `-h` option:
115
+
116
+
:::{tip}
117
+
Ideally this task will be automated such that it's performed by a bot or GitHub action when you create a pull request. More details to come as we refine the workflows.
118
+
:::
119
+
120
+
For up-to-date command usage information, use the `-h` option:
119
121
120
122
```sh
121
123
Add a new changelog from command-line input
@@ -140,6 +142,24 @@ Options:
140
142
--use-pr-number Optional: Use the PR number as the filename instead of generating it from a unique ID and title
141
143
```
142
144
145
+
### Authorization
146
+
147
+
If you use the `--prs` option, the `docs-builder changelog add` command interacts with GitHub services.
148
+
Log into GitHub or set the `GITHUB_TOKEN` (or `GH_TOKEN` ) environment variable with a sufficient personal access token (PAT).
149
+
Otherwise, there will be fetch failures when you access private repositories and you might also encounter GitHub rate limiting errors.
150
+
151
+
For example, to create a new token with the minimum authority to read pull request details:
152
+
153
+
1. Go to **GitHub Settings** > **Developer settings** > **Personal access tokens** > [Fine-grained tokens](https://github.com/settings/personal-access-tokens).
154
+
2. Click **Generate new token**.
155
+
3. Give your token a descriptive name (such as "docs-builder changelog").
156
+
4. Under **Resource owner** if you're an Elastic employee, select **Elastic**.
157
+
5. Set an expiration date.
158
+
6. Under **Repository access**, select **Only select repositories** and choose the repositories you want to access.
159
+
7. Under **Permissions** > **Repository permissions**, set **Pull requests** to **Read-only**.
160
+
8. Click **Generate token**.
161
+
9. Copy the token to a safe location and use it in the `GITHUB_TOKEN` environment variable.
162
+
143
163
### Product format
144
164
145
165
The `docs-builder changelog add` has a `--products` option and the `docs-builder changelog bundle` has `--input-products` and `--output-products` options that all use the same format.
0 commit comments