Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs to always have latest default labels #1798

Merged
merged 1 commit into from Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/components/defaultLabelsRenderer.js
@@ -0,0 +1,31 @@
import { igniteComponents } from "next-ignite";
// eslint-disable-next-line import/no-extraneous-dependencies
import { defaultLabels } from "@auto-it/core/dist/semver";
import Highlight, { defaultProps } from "prism-react-renderer";

/** Render the current default labels in a details element */
export const DefaultLabelRenderer = () => (
<details>
<summary>Click here to see the default label configuration</summary>

<Highlight
Prism={defaultProps.Prism}
code={JSON.stringify(defaultLabels, null, 2)}
language="json"
>
{({ className, style, tokens, getLineProps, getTokenProps }) => (
<igniteComponents.pre className={className} style={style}>
<igniteComponents.code className="language-json">
{tokens.map((line, i) => (
<div {...getLineProps({ line, key: i })}>
{line.map((token, key) => (
<span {...getTokenProps({ token, key })} />
))}
</div>
))}
</igniteComponents.code>
</igniteComponents.pre>
)}
</Highlight>
</details>
);
51 changes: 3 additions & 48 deletions docs/pages/docs/configuration/autorc.mdx
Expand Up @@ -2,6 +2,8 @@
title: \`auto\` Configuration File
---

import { DefaultLabelRenderer } from "../../../components/defaultLabelsRenderer";

`auto` uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) to find your config.
This means you can define this file a variety of ways.
`cosmiconfig` will start at the root of your project and start to search up the directory tree for the following:
Expand Down Expand Up @@ -196,54 +198,7 @@ To customize your project's labels use the `labels` section in your `.autorc`.
}
```

<details><summary>Click here to see the default label configuration</summary>

```json
[
{
name: "major",
changelogTitle: "💥 Breaking Change",
description: "Increment the major version when merged",
releaseType: "major",
},
{
name: "minor",
changelogTitle: "🚀 Enhancement",
description: "Increment the minor version when merged",
releaseType: "minor",
},
{
name: "patch",
changelogTitle: "🐛 Bug Fix",
description: "Increment the patch version when merged",
releaseType: "patch",
},
{
name: "skip-release",
description: "Preserve the current version when merged",
releaseType: "skip",
},
{
name: "release",
description: "Create a release when this pr is merged",
releaseType: "release",
},
{
name: "internal",
changelogTitle: "🏠 Internal",
description: "Changes only affect the internal API",
releaseType: "none",
},
{
name: "documentation",
changelogTitle: "📝 Documentation",
description: "Changes only affect the documentation",
releaseType: "none",
},
];
```

</details>
<DefaultLabelRenderer />

#### Label Customization

Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -68,6 +68,7 @@
"lint-staged": "^10.0.7",
"next-ignite": "^0.9.16",
"prettier": "^2.0.1",
"prism-react-renderer": "^1.1.1",
"push-dir": "^0.4.1",
"rimraf": "^3.0.0",
"simple-react-lightbox": "^3.1.2-3",
Expand Down
17 changes: 11 additions & 6 deletions yarn.lock
Expand Up @@ -59,10 +59,10 @@
integrity sha512-TYiuOxy5Pf9ORn94X/ujl7PY9opIh+l6NzRAV8EBLpIv3IC9gmEoev4wmmyP7Q33J0/nGjqxAaZcq/n2SZrYaQ==

"@auto-it/bot-list@link:packages/bot-list":
version "10.13.4"
version "10.16.1"

"@auto-it/core@link:packages/core":
version "10.13.4"
version "10.16.1"
dependencies:
"@auto-it/bot-list" "link:packages/bot-list"
"@octokit/plugin-enterprise-compatibility" "^1.2.2"
Expand Down Expand Up @@ -102,7 +102,7 @@
url-join "^4.0.0"

"@auto-it/npm@link:plugins/npm":
version "10.13.4"
version "10.16.1"
dependencies:
"@auto-it/core" "link:packages/core"
"@auto-it/package-json-utils" "link:packages/package-json-utils"
Expand All @@ -119,13 +119,13 @@
user-home "^2.0.0"

"@auto-it/package-json-utils@link:packages/package-json-utils":
version "10.13.4"
version "10.16.1"
dependencies:
parse-author "^2.0.0"
parse-github-url "1.0.2"

"@auto-it/released@link:plugins/released":
version "10.13.4"
version "10.16.1"
dependencies:
"@auto-it/bot-list" "link:packages/bot-list"
"@auto-it/core" "link:packages/core"
Expand All @@ -135,7 +135,7 @@
tslib "2.0.3"

"@auto-it/slack@link:plugins/slack":
version "10.13.4"
version "10.16.1"
dependencies:
"@atomist/slack-messages" "~1.2.0"
"@auto-it/core" "link:packages/core"
Expand Down Expand Up @@ -12557,6 +12557,11 @@ pretty-ms@^7.0.0:
dependencies:
parse-ms "^2.1.0"

prism-react-renderer@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.1.1.tgz#1c1be61b1eb9446a146ca7a50b7bcf36f2a70a44"
integrity sha512-MgMhSdHuHymNRqD6KM3eGS0PNqgK9q4QF5P0yoQQvpB6jNjeSAi3jcSAz0Sua/t9fa4xDOMar9HJbLa08gl9ug==

prismjs@~1.17.0:
version "1.17.1"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.17.1.tgz#e669fcbd4cdd873c35102881c33b14d0d68519be"
Expand Down