Skip to content

Commit 6168e1b

Browse files
update docs to always have latest default labels
1 parent 8202af4 commit 6168e1b

File tree

4 files changed

+46
-54
lines changed

4 files changed

+46
-54
lines changed
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { igniteComponents } from "next-ignite";
2+
// eslint-disable-next-line import/no-extraneous-dependencies
3+
import { defaultLabels } from "@auto-it/core/dist/semver";
4+
import Highlight, { defaultProps } from "prism-react-renderer";
5+
6+
/** Render the current default labels in a details element */
7+
export const DefaultLabelRenderer = () => (
8+
<details>
9+
<summary>Click here to see the default label configuration</summary>
10+
11+
<Highlight
12+
Prism={defaultProps.Prism}
13+
code={JSON.stringify(defaultLabels, null, 2)}
14+
language="json"
15+
>
16+
{({ className, style, tokens, getLineProps, getTokenProps }) => (
17+
<igniteComponents.pre className={className} style={style}>
18+
<igniteComponents.code className="language-json">
19+
{tokens.map((line, i) => (
20+
<div {...getLineProps({ line, key: i })}>
21+
{line.map((token, key) => (
22+
<span {...getTokenProps({ token, key })} />
23+
))}
24+
</div>
25+
))}
26+
</igniteComponents.code>
27+
</igniteComponents.pre>
28+
)}
29+
</Highlight>
30+
</details>
31+
);

docs/pages/docs/configuration/autorc.mdx

+3-48
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: \`auto\` Configuration File
33
---
44

5+
import { DefaultLabelRenderer } from "../../../components/defaultLabelsRenderer";
6+
57
`auto` uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to find your config.
68
This means you can define this file a variety of ways.
79
`cosmiconfig` will start at the root of your project and start to search up the directory tree for the following:
@@ -196,54 +198,7 @@ To customize your project's labels use the `labels` section in your `.autorc`.
196198
}
197199
```
198200

199-
<details><summary>Click here to see the default label configuration</summary>
200-
201-
```json
202-
[
203-
{
204-
name: "major",
205-
changelogTitle: "💥 Breaking Change",
206-
description: "Increment the major version when merged",
207-
releaseType: "major",
208-
},
209-
{
210-
name: "minor",
211-
changelogTitle: "🚀 Enhancement",
212-
description: "Increment the minor version when merged",
213-
releaseType: "minor",
214-
},
215-
{
216-
name: "patch",
217-
changelogTitle: "🐛 Bug Fix",
218-
description: "Increment the patch version when merged",
219-
releaseType: "patch",
220-
},
221-
{
222-
name: "skip-release",
223-
description: "Preserve the current version when merged",
224-
releaseType: "skip",
225-
},
226-
{
227-
name: "release",
228-
description: "Create a release when this pr is merged",
229-
releaseType: "release",
230-
},
231-
{
232-
name: "internal",
233-
changelogTitle: "🏠 Internal",
234-
description: "Changes only affect the internal API",
235-
releaseType: "none",
236-
},
237-
{
238-
name: "documentation",
239-
changelogTitle: "📝 Documentation",
240-
description: "Changes only affect the documentation",
241-
releaseType: "none",
242-
},
243-
];
244-
```
245-
246-
</details>
201+
<DefaultLabelRenderer />
247202

248203
#### Label Customization
249204

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"lint-staged": "^10.0.7",
6969
"next-ignite": "^0.9.16",
7070
"prettier": "^2.0.1",
71+
"prism-react-renderer": "^1.1.1",
7172
"push-dir": "^0.4.1",
7273
"rimraf": "^3.0.0",
7374
"simple-react-lightbox": "^3.1.2-3",

yarn.lock

+11-6
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959
integrity sha512-TYiuOxy5Pf9ORn94X/ujl7PY9opIh+l6NzRAV8EBLpIv3IC9gmEoev4wmmyP7Q33J0/nGjqxAaZcq/n2SZrYaQ==
6060

6161
"@auto-it/bot-list@link:packages/bot-list":
62-
version "10.13.4"
62+
version "10.16.1"
6363

6464
"@auto-it/core@link:packages/core":
65-
version "10.13.4"
65+
version "10.16.1"
6666
dependencies:
6767
"@auto-it/bot-list" "link:packages/bot-list"
6868
"@octokit/plugin-enterprise-compatibility" "^1.2.2"
@@ -102,7 +102,7 @@
102102
url-join "^4.0.0"
103103

104104
"@auto-it/npm@link:plugins/npm":
105-
version "10.13.4"
105+
version "10.16.1"
106106
dependencies:
107107
"@auto-it/core" "link:packages/core"
108108
"@auto-it/package-json-utils" "link:packages/package-json-utils"
@@ -119,13 +119,13 @@
119119
user-home "^2.0.0"
120120

121121
"@auto-it/package-json-utils@link:packages/package-json-utils":
122-
version "10.13.4"
122+
version "10.16.1"
123123
dependencies:
124124
parse-author "^2.0.0"
125125
parse-github-url "1.0.2"
126126

127127
"@auto-it/released@link:plugins/released":
128-
version "10.13.4"
128+
version "10.16.1"
129129
dependencies:
130130
"@auto-it/bot-list" "link:packages/bot-list"
131131
"@auto-it/core" "link:packages/core"
@@ -135,7 +135,7 @@
135135
tslib "2.0.3"
136136

137137
"@auto-it/slack@link:plugins/slack":
138-
version "10.13.4"
138+
version "10.16.1"
139139
dependencies:
140140
"@atomist/slack-messages" "~1.2.0"
141141
"@auto-it/core" "link:packages/core"
@@ -12557,6 +12557,11 @@ pretty-ms@^7.0.0:
1255712557
dependencies:
1255812558
parse-ms "^2.1.0"
1255912559

12560+
prism-react-renderer@^1.1.1:
12561+
version "1.1.1"
12562+
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.1.1.tgz#1c1be61b1eb9446a146ca7a50b7bcf36f2a70a44"
12563+
integrity sha512-MgMhSdHuHymNRqD6KM3eGS0PNqgK9q4QF5P0yoQQvpB6jNjeSAi3jcSAz0Sua/t9fa4xDOMar9HJbLa08gl9ug==
12564+
1256012565
prismjs@~1.17.0:
1256112566
version "1.17.1"
1256212567
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be"

0 commit comments

Comments
 (0)