@mastra/dane 0.0.2-alpha.7 → 0.0.2-alpha.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +44 -0
- package/README.md +25 -4
- package/data/crawl/conventional-commit.json +25 -0
- package/dist/commands/changelog.d.ts +2 -0
- package/dist/commands/changelog.d.ts.map +1 -0
- package/dist/commands/changelog.js +15 -0
- package/dist/commands/commit-message.d.ts +2 -0
- package/dist/commands/commit-message.d.ts.map +1 -0
- package/dist/commands/commit-message.js +32 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +40 -0
- package/dist/commands/issue-labeler.d.ts.map +1 -1
- package/dist/commands/issue-labeler.js +19 -2
- package/dist/commands/link-checker.d.ts +4 -0
- package/dist/commands/link-checker.d.ts.map +1 -0
- package/dist/commands/link-checker.js +16 -0
- package/dist/commands/message.d.ts.map +1 -1
- package/dist/commands/message.js +3 -1
- package/dist/commands/new-contributor-message.d.ts +2 -0
- package/dist/commands/new-contributor-message.d.ts.map +1 -0
- package/dist/commands/new-contributor-message.js +43 -0
- package/dist/commands/publish-packages.d.ts +2 -0
- package/dist/commands/publish-packages.d.ts.map +1 -0
- package/dist/commands/publish-packages.js +11 -0
- package/dist/commands/telephone-game.d.ts +2 -0
- package/dist/commands/telephone-game.d.ts.map +1 -0
- package/dist/commands/telephone-game.js +32 -0
- package/dist/config/index.d.ts +12 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +75 -0
- package/dist/index.js +30 -2
- package/dist/mastra/agents/index.d.ts +116 -0
- package/dist/mastra/agents/index.d.ts.map +1 -1
- package/dist/mastra/agents/index.js +92 -24
- package/dist/mastra/agents/model.d.ts +7 -0
- package/dist/mastra/agents/model.d.ts.map +1 -0
- package/dist/mastra/agents/model.js +7 -0
- package/dist/mastra/agents/new-contributor.d.ts +3 -0
- package/dist/mastra/agents/new-contributor.d.ts.map +1 -0
- package/dist/mastra/agents/new-contributor.js +12 -0
- package/dist/mastra/index.d.ts +157 -1
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +19 -3
- package/dist/mastra/integrations/index.d.ts +2 -0
- package/dist/mastra/integrations/index.d.ts.map +1 -1
- package/dist/mastra/integrations/index.js +19 -2
- package/dist/mastra/tools/crawl.d.ts +3 -0
- package/dist/mastra/tools/crawl.d.ts.map +1 -1
- package/dist/mastra/tools/crawl.js +4 -2
- package/dist/mastra/tools/execa.d.ts.map +1 -1
- package/dist/mastra/tools/execa.js +5 -1
- package/dist/mastra/tools/image.d.ts +27 -0
- package/dist/mastra/tools/image.d.ts.map +1 -0
- package/dist/mastra/tools/image.js +37 -0
- package/dist/mastra/tools/mcp.d.ts +3 -0
- package/dist/mastra/tools/mcp.d.ts.map +1 -0
- package/dist/mastra/tools/mcp.js +12 -0
- package/dist/mastra/tools/pdf.d.ts.map +1 -1
- package/dist/mastra/tools/pdf.js +3 -2
- package/dist/mastra/tools/pnpm.d.ts +60 -0
- package/dist/mastra/tools/pnpm.d.ts.map +1 -0
- package/dist/mastra/tools/pnpm.js +128 -0
- package/dist/mastra/workflows/changelog.d.ts +10 -0
- package/dist/mastra/workflows/changelog.d.ts.map +1 -0
- package/dist/mastra/workflows/changelog.js +149 -0
- package/dist/mastra/workflows/chat.d.ts.map +1 -1
- package/dist/mastra/workflows/chat.js +6 -11
- package/dist/mastra/workflows/commit-message.d.ts +10 -0
- package/dist/mastra/workflows/commit-message.d.ts.map +1 -0
- package/dist/mastra/workflows/commit-message.js +138 -0
- package/dist/mastra/workflows/first-contributor.d.ts +16 -0
- package/dist/mastra/workflows/first-contributor.d.ts.map +1 -0
- package/dist/mastra/workflows/first-contributor.js +122 -0
- package/dist/mastra/workflows/index.d.ts +1 -0
- package/dist/mastra/workflows/index.d.ts.map +1 -1
- package/dist/mastra/workflows/index.js +1 -0
- package/dist/mastra/workflows/issue-labeler.js +1 -1
- package/dist/mastra/workflows/link-checker.d.ts +13 -0
- package/dist/mastra/workflows/link-checker.d.ts.map +1 -0
- package/dist/mastra/workflows/link-checker.js +102 -0
- package/dist/mastra/workflows/publish-packages.d.ts +3 -0
- package/dist/mastra/workflows/publish-packages.d.ts.map +1 -0
- package/dist/mastra/workflows/publish-packages.js +273 -0
- package/dist/mastra/workflows/telephone-game.d.ts +3 -0
- package/dist/mastra/workflows/telephone-game.d.ts.map +1 -0
- package/dist/mastra/workflows/telephone-game.js +95 -0
- package/package.json +13 -9
- package/test-files/716a95a5c57a56d32a32b1c9592d6df0.png +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Elastic License 2.0 (ELv2)
|
|
2
|
+
|
|
3
|
+
**Acceptance**
|
|
4
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
5
|
+
|
|
6
|
+
**Copyright License**
|
|
7
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
|
|
8
|
+
|
|
9
|
+
**Limitations**
|
|
10
|
+
You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
|
|
11
|
+
|
|
12
|
+
You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
|
|
13
|
+
|
|
14
|
+
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
15
|
+
|
|
16
|
+
**Patents**
|
|
17
|
+
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
18
|
+
|
|
19
|
+
**Notices**
|
|
20
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
21
|
+
|
|
22
|
+
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
23
|
+
|
|
24
|
+
**No Other Rights**
|
|
25
|
+
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
26
|
+
|
|
27
|
+
**Termination**
|
|
28
|
+
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
29
|
+
|
|
30
|
+
**No Liability**
|
|
31
|
+
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
|
|
32
|
+
|
|
33
|
+
**Definitions**
|
|
34
|
+
The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
|
|
35
|
+
|
|
36
|
+
_you_ refers to the individual or entity agreeing to these terms.
|
|
37
|
+
|
|
38
|
+
_your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
39
|
+
|
|
40
|
+
_your licenses_ are all the licenses granted to you for the software under these terms.
|
|
41
|
+
|
|
42
|
+
_use_ means anything you do with the software requiring one of your licenses.
|
|
43
|
+
|
|
44
|
+
_trademark_ means trademarks, service marks, and similar rights.
|
package/README.md
CHANGED
|
@@ -7,13 +7,15 @@ Hey there! I'm Dane, and I'm excited to be your AI assistant and coding companio
|
|
|
7
7
|
You can install me directly from npm:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install @mastra/dane
|
|
10
|
+
npm install -g @mastra/dane@alpha
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## What I Can Do
|
|
14
14
|
|
|
15
15
|
I'm here to make your development journey smoother and more enjoyable. Here's what I'm capable of:
|
|
16
16
|
|
|
17
|
+
- I can generate semantically correct commit messages
|
|
18
|
+
- I can apply labels to GitHub issues
|
|
17
19
|
- I can help you write and test code
|
|
18
20
|
- I'm great at deploying applications to the cloud
|
|
19
21
|
- I can assist with file system operations
|
|
@@ -27,7 +29,8 @@ I'm here to make your development journey smoother and more enjoyable. Here's wh
|
|
|
27
29
|
```
|
|
28
30
|
src/
|
|
29
31
|
├── index.ts # Main entry point
|
|
30
|
-
├──
|
|
32
|
+
├── config/ # Configuration setup
|
|
33
|
+
├── commands/ # CLI commands
|
|
31
34
|
└── mastra/ # Core functionality
|
|
32
35
|
├── agents/ # AI agents definitions
|
|
33
36
|
├── integrations/ # External service integrations
|
|
@@ -39,6 +42,12 @@ src/
|
|
|
39
42
|
|
|
40
43
|
- **Interactive CLI Interface**: I provide a friendly command-line interface with colored output using chalk
|
|
41
44
|
- **GitHub Integration**: I can help with automated issue labeling
|
|
45
|
+
- **GitHub Integration**: I can help with generating commit messages
|
|
46
|
+
- **FireCrawl Integration**: I can crawl websites and gather data
|
|
47
|
+
- **Tool: PDF Reader**: I can read PDFs and extract information
|
|
48
|
+
- **Tool: Calendar**: I can help with managing your calendar
|
|
49
|
+
- **Tool: Web Search**: I can search the web for answers to your questions
|
|
50
|
+
- **Tool: File System**: I can help with file system operations (read, write, append)
|
|
42
51
|
- **Workflow System**: I use a modular workflow system to execute various tasks
|
|
43
52
|
- **Mastra Framework**: I leverage a core framework with agents, integrations, and tools
|
|
44
53
|
|
|
@@ -46,12 +55,24 @@ src/
|
|
|
46
55
|
|
|
47
56
|
To start working with me:
|
|
48
57
|
|
|
58
|
+
Make sure you have a local postgres database running at `5433:5432` with the database name `mastra`.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Setup config keys (one time setup)
|
|
62
|
+
dane config --set ANTHROPIC_API_KEY=<your-key>
|
|
63
|
+
```
|
|
64
|
+
|
|
49
65
|
```bash
|
|
50
66
|
# Run the main application
|
|
51
|
-
|
|
67
|
+
dane
|
|
52
68
|
|
|
53
69
|
# Run the issue labeler
|
|
54
|
-
|
|
70
|
+
dane issue-labeler
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Run the commit message generator
|
|
75
|
+
dane commit
|
|
55
76
|
```
|
|
56
77
|
|
|
57
78
|
## Environment Variables
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rawHtml": "<!DOCTYPE html><html class=\"\"><head>\n \n <script type=\"text/javascript\" async=\"\" src=\"https://www.google-analytics.com/analytics.js\"></script><script type=\"text/javascript\" async=\"\" src=\"https://www.googletagmanager.com/gtag/js?id=G-VM0YCVSFN7&l=dataLayer&cx=c&gtm=457e4cc1za200\"></script><script async=\"\" src=\"https://www.googletagmanager.com/gtag/js?id=UA-2173276-5\"></script>\n <script>\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', 'UA-2173276-5');\n </script>\n \n <style class=\"anchorjs\"></style><link rel=\"stylesheet\" href=\"/css/style.css\">\n\n <title>Conventional Commits</title>\n <meta name=\"description\" content=\"A specification for adding human and machine readable meaning to commit messages\">\n <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1,initial-scale=1,maximum-scale=1,user-scalable=no\">\n\n \n <meta name=\"twitter:card\" content=\"A specification for adding human and machine readable meaning to commit messages\">\n <meta name=\"twitter:title\" content=\"Conventional Commits\">\n <meta name=\"twitter:description\" content=\"A specification for adding human and machine readable meaning to commit messages\">\n\n \n <meta property=\"og:title\" content=\"Conventional Commits\">\n <meta property=\"og:type\" content=\"article\">\n <meta property=\"og:url\" content=\"/en/v1.0.0/\">\n <meta property=\"og:description\" content=\"A specification for adding human and machine readable meaning to commit messages\">\n <meta property=\"og:site_name\" content=\"Conventional Commits\">\n</head>\n<body class=\"\"><header class=\"header\">\n <div class=\"container\">\n <a href=\"/\">\n <div class=\"logo\"></div>\n </a>\n <ul class=\"header__menu\">\n <li class=\"header__menu-item dropdown\">\n <button class=\"dropdown__label\">Versions</button>\n <ul class=\"dropdown__options\">\n \n <li class=\"dropdown__option\"><a href=\"/en/v1.0.0\">v1.0.0</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/en/v1.0.0-beta.4\">v1.0.0-beta.4</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/en/v1.0.0-beta.3\">v1.0.0-beta.3</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/en/v1.0.0-beta.2\">v1.0.0-beta.2</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/en/v1.0.0-beta.1\">v1.0.0-beta.1</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/en/v1.0.0-beta\">v1.0.0-beta</a></li>\n \n </ul>\n </li>\n <li class=\"header__menu-item dropdown\">\n <button class=\"dropdown__label\">Languages</button>\n <ul class=\"dropdown__options\">\n \n <li class=\"dropdown__option\"><a href=\"/en/\">English</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/it/\">Italian</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/pl/\">Polish</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/zh-hans/\">简体中文</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/zh-hant/\">繁體中文</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/es/\">Spanish</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/ru/\">Русский</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/ja/\">日本語</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/fr/\">Français</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/ko/\">한국어</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/pt-br/\">Português Brasileiro</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/id/\">Indonesia</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/hy/\">Հայերեն</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/de/\">Deutsch</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/th/\">ไทย</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/uk/\">Ukrainian - Українська</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/be/\">Belarusian - Беларуская</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/tr/\">Türkçe</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/nl/\">Nederlands</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/ml/\">Malayalam - മലയാളം</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/ro/\">Romanian</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/bn/\">বাংলা (Bengali)</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/uz/\">Uzbek (O'zbekcha)</a></li>\n \n <li class=\"dropdown__option\"><a href=\"/ar/\">العربية</a></li>\n \n </ul>\n </li>\n <li class=\"header__menu-item dropdown\">\n <button class=\"dropdown__label\">\n <a href=\"/en/about\" class=\"no-style-a\">About</a>\n </button>\n </li>\n </ul>\n </div>\n</header>\n<section class=\"welcome\">\n <div class=\"container\">\n <h1 class=\"welcome__title\">Conventional Commits</h1>\n <p class=\"welcome__description\">A specification for adding human and machine readable meaning to commit messages</p>\n \n <div class=\"welcome__actions\">\n \n <a class=\"welcome__action\" href=\"#summary\">Quick Summary</a>\n \n <a class=\"welcome__action\" href=\"#specification\">Full Specification</a>\n \n <a class=\"welcome__action\" href=\"https://github.com/conventional-commits/conventionalcommits.org\">Contribute</a>\n \n </div>\n \n <figure class=\"welcome__image \">\n <img src=\"/img/git-flow--welcome.png\">\n </figure>\n </div>\n</section>\n<main>\n <article class=\"container markdown-body\">\n <h1 id=\"conventional-commits-100\">Conventional Commits 1.0.0</h1>\n<h2 id=\"summary\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#summary\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Summary</h2>\n<p>The Conventional Commits specification is a lightweight convention on top of commit messages.\nIt provides an easy set of rules for creating an explicit commit history;\nwhich makes it easier to write automated tools on top of.\nThis convention dovetails with <a href=\"http://semver.org\">SemVer</a>,\nby describing the features, fixes, and breaking changes made in commit messages.</p>\n<p>The commit message should be structured as follows:</p>\n<hr>\n<pre><code><type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer(s)]\n</code></pre><hr>\n<p><!-- raw HTML omitted -->\nThe commit contains the following structural elements, to communicate intent to the\nconsumers of your library:</p>\n<ol>\n<li><strong>fix:</strong> a commit of the <em>type</em> <code>fix</code> patches a bug in your codebase (this correlates with <a href=\"http://semver.org/#summary\"><code>PATCH</code></a> in Semantic Versioning).</li>\n<li><strong>feat:</strong> a commit of the <em>type</em> <code>feat</code> introduces a new feature to the codebase (this correlates with <a href=\"http://semver.org/#summary\"><code>MINOR</code></a> in Semantic Versioning).</li>\n<li><strong>BREAKING CHANGE:</strong> a commit that has a footer <code>BREAKING CHANGE:</code>, or appends a <code>!</code> after the type/scope, introduces a breaking API change (correlating with <a href=\"http://semver.org/#summary\"><code>MAJOR</code></a> in Semantic Versioning).\nA BREAKING CHANGE can be part of commits of any <em>type</em>.</li>\n<li><em>types</em> other than <code>fix:</code> and <code>feat:</code> are allowed, for example <a href=\"https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional\">@commitlint/config-conventional</a> (based on the <a href=\"https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines\">Angular convention</a>) recommends <code>build:</code>, <code>chore:</code>,\n<code>ci:</code>, <code>docs:</code>, <code>style:</code>, <code>refactor:</code>, <code>perf:</code>, <code>test:</code>, and others.</li>\n<li><em>footers</em> other than <code>BREAKING CHANGE: <description></code> may be provided and follow a convention similar to\n<a href=\"https://git-scm.com/docs/git-interpret-trailers\">git trailer format</a>.</li>\n</ol>\n<p>Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE).\n<!-- raw HTML omitted --><!-- raw HTML omitted -->\nA scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., <code>feat(parser): add ability to parse arrays</code>.</p>\n<h2 id=\"examples\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#examples\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Examples</h2>\n<h3 id=\"commit-message-with-description-and-breaking-change-footer\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#commit-message-with-description-and-breaking-change-footer\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Commit message with description and breaking change footer</h3>\n<pre><code>feat: allow provided config object to extend other configs\n\nBREAKING CHANGE: `extends` key in config file is now used for extending other config files\n</code></pre><h3 id=\"commit-message-with--to-draw-attention-to-breaking-change\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#commit-message-with--to-draw-attention-to-breaking-change\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Commit message with <code>!</code> to draw attention to breaking change</h3>\n<pre><code>feat!: send an email to the customer when a product is shipped\n</code></pre><h3 id=\"commit-message-with-scope-and--to-draw-attention-to-breaking-change\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#commit-message-with-scope-and--to-draw-attention-to-breaking-change\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Commit message with scope and <code>!</code> to draw attention to breaking change</h3>\n<pre><code>feat(api)!: send an email to the customer when a product is shipped\n</code></pre><h3 id=\"commit-message-with-both--and-breaking-change-footer\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#commit-message-with-both--and-breaking-change-footer\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Commit message with both <code>!</code> and BREAKING CHANGE footer</h3>\n<pre><code>chore!: drop support for Node 6\n\nBREAKING CHANGE: use JavaScript features not available in Node 6.\n</code></pre><h3 id=\"commit-message-with-no-body\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#commit-message-with-no-body\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Commit message with no body</h3>\n<pre><code>docs: correct spelling of CHANGELOG\n</code></pre><h3 id=\"commit-message-with-scope\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#commit-message-with-scope\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Commit message with scope</h3>\n<pre><code>feat(lang): add Polish language\n</code></pre><h3 id=\"commit-message-with-multi-paragraph-body-and-multiple-footers\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#commit-message-with-multi-paragraph-body-and-multiple-footers\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Commit message with multi-paragraph body and multiple footers</h3>\n<pre><code>fix: prevent racing of requests\n\nIntroduce a request id and a reference to latest request. Dismiss\nincoming responses other than from latest request.\n\nRemove timeouts which were used to mitigate the racing issue but are\nobsolete now.\n\nReviewed-by: Z\nRefs: #123\n</code></pre><h2 id=\"specification\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#specification\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Specification</h2>\n<p>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in <a href=\"https://www.ietf.org/rfc/rfc2119.txt\">RFC 2119</a>.</p>\n<ol>\n<li>Commits MUST be prefixed with a type, which consists of a noun, <code>feat</code>, <code>fix</code>, etc., followed\nby the OPTIONAL scope, OPTIONAL <code>!</code>, and REQUIRED terminal colon and space.</li>\n<li>The type <code>feat</code> MUST be used when a commit adds a new feature to your application or library.</li>\n<li>The type <code>fix</code> MUST be used when a commit represents a bug fix for your application.</li>\n<li>A scope MAY be provided after a type. A scope MUST consist of a noun describing a\nsection of the codebase surrounded by parenthesis, e.g., <code>fix(parser):</code></li>\n<li>A description MUST immediately follow the colon and space after the type/scope prefix.\nThe description is a short summary of the code changes, e.g., <em>fix: array parsing issue when multiple spaces were contained in string</em>.</li>\n<li>A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.</li>\n<li>A commit body is free-form and MAY consist of any number of newline separated paragraphs.</li>\n<li>One or more footers MAY be provided one blank line after the body. Each footer MUST consist of\na word token, followed by either a <code>:<space></code> or <code><space>#</code> separator, followed by a string value (this is inspired by the\n<a href=\"https://git-scm.com/docs/git-interpret-trailers\">git trailer convention</a>).</li>\n<li>A footer’s token MUST use <code>-</code> in place of whitespace characters, e.g., <code>Acked-by</code> (this helps differentiate\nthe footer section from a multi-paragraph body). An exception is made for <code>BREAKING CHANGE</code>, which MAY also be used as a token.</li>\n<li>A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer\ntoken/separator pair is observed.</li>\n<li>Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the\nfooter.</li>\n<li>If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,\n<em>BREAKING CHANGE: environment variables now take precedence over config files</em>.</li>\n<li>If included in the type/scope prefix, breaking changes MUST be indicated by a\n<code>!</code> immediately before the <code>:</code>. If <code>!</code> is used, <code>BREAKING CHANGE:</code> MAY be omitted from the footer section,\nand the commit description SHALL be used to describe the breaking change.</li>\n<li>Types other than <code>feat</code> and <code>fix</code> MAY be used in your commit messages, e.g., <em>docs: update ref docs.</em></li>\n<li>The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.</li>\n<li>BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.</li>\n</ol>\n<h2 id=\"why-use-conventional-commits\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#why-use-conventional-commits\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Why Use Conventional Commits</h2>\n<ul>\n<li>Automatically generating CHANGELOGs.</li>\n<li>Automatically determining a semantic version bump (based on the types of commits landed).</li>\n<li>Communicating the nature of changes to teammates, the public, and other stakeholders.</li>\n<li>Triggering build and publish processes.</li>\n<li>Making it easier for people to contribute to your projects, by allowing them to explore\na more structured commit history.</li>\n</ul>\n<h2 id=\"faq\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#faq\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>FAQ</h2>\n<h3 id=\"how-should-i-deal-with-commit-messages-in-the-initial-development-phase\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#how-should-i-deal-with-commit-messages-in-the-initial-development-phase\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>How should I deal with commit messages in the initial development phase?</h3>\n<p>We recommend that you proceed as if you’ve already released the product. Typically <em>somebody</em>, even if it’s your fellow software developers, is using your software. They’ll want to know what’s fixed, what breaks etc.</p>\n<h3 id=\"are-the-types-in-the-commit-title-uppercase-or-lowercase\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#are-the-types-in-the-commit-title-uppercase-or-lowercase\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Are the types in the commit title uppercase or lowercase?</h3>\n<p>Any casing may be used, but it’s best to be consistent.</p>\n<h3 id=\"what-do-i-do-if-the-commit-conforms-to-more-than-one-of-the-commit-types\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#what-do-i-do-if-the-commit-conforms-to-more-than-one-of-the-commit-types\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>What do I do if the commit conforms to more than one of the commit types?</h3>\n<p>Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.</p>\n<h3 id=\"doesnt-this-discourage-rapid-development-and-fast-iteration\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#doesnt-this-discourage-rapid-development-and-fast-iteration\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Doesn’t this discourage rapid development and fast iteration?</h3>\n<p>It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.</p>\n<h3 id=\"might-conventional-commits-lead-developers-to-limit-the-type-of-commits-they-make-because-theyll-be-thinking-in-the-types-provided\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#might-conventional-commits-lead-developers-to-limit-the-type-of-commits-they-make-because-theyll-be-thinking-in-the-types-provided\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Might Conventional Commits lead developers to limit the type of commits they make because they’ll be thinking in the types provided?</h3>\n<p>Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.</p>\n<h3 id=\"how-does-this-relate-to-semver\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#how-does-this-relate-to-semver\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>How does this relate to SemVer?</h3>\n<p><code>fix</code> type commits should be translated to <code>PATCH</code> releases. <code>feat</code> type commits should be translated to <code>MINOR</code> releases. Commits with <code>BREAKING CHANGE</code> in the commits, regardless of type, should be translated to <code>MAJOR</code> releases.</p>\n<h3 id=\"how-should-i-version-my-extensions-to-the-conventional-commits-specification-eg-jameswomackconventional-commit-spec\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#how-should-i-version-my-extensions-to-the-conventional-commits-specification-eg-jameswomackconventional-commit-spec\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>How should I version my extensions to the Conventional Commits Specification, e.g. <code>@jameswomack/conventional-commit-spec</code>?</h3>\n<p>We recommend using SemVer to release your own extensions to this specification (and\nencourage you to make these extensions!)</p>\n<h3 id=\"what-do-i-do-if-i-accidentally-use-the-wrong-commit-type\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#what-do-i-do-if-i-accidentally-use-the-wrong-commit-type\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>What do I do if I accidentally use the wrong commit type?</h3>\n<h4 id=\"when-you-used-a-type-thats-of-the-spec-but-not-the-correct-type-eg-fix-instead-of-feat\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#when-you-used-a-type-thats-of-the-spec-but-not-the-correct-type-eg-fix-instead-of-feat\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>When you used a type that’s of the spec but not the correct type, e.g. <code>fix</code> instead of <code>feat</code></h4>\n<p>Prior to merging or releasing the mistake, we recommend using <code>git rebase -i</code> to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.</p>\n<h4 id=\"when-you-used-a-type-not-of-the-spec-eg-feet-instead-of-feat\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#when-you-used-a-type-not-of-the-spec-eg-feet-instead-of-feat\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>When you used a type <em>not</em> of the spec, e.g. <code>feet</code> instead of <code>feat</code></h4>\n<p>In a worst case scenario, it’s not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.</p>\n<h3 id=\"do-all-my-contributors-need-to-use-the-conventional-commits-specification\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#do-all-my-contributors-need-to-use-the-conventional-commits-specification\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>Do all my contributors need to use the Conventional Commits specification?</h3>\n<p>No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they’re merged—adding no workload to casual committers.\nA common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.</p>\n<h3 id=\"how-does-conventional-commits-handle-revert-commits\"><a class=\"anchorjs-link \" aria-label=\"Anchor\" data-anchorjs-icon=\"\" href=\"#how-does-conventional-commits-handle-revert-commits\" style=\"font-style: normal; font-variant: normal; font-size-adjust: none; font-kerning: auto; font-optical-sizing: auto; font-feature-settings: normal; font-variation-settings: normal; font-weight: normal; font-stretch: normal; font-size: 1em; line-height: inherit; font-family: anchorjs-icons; position: absolute; margin-left: -1em; padding-right: 0.5em;\"></a>How does Conventional Commits handle revert commits?</h3>\n<p>Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?</p>\n<p>Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling\nauthors to use the flexibility of <em>types</em> and <em>footers</em> to develop their logic for handling reverts.</p>\n<p>One recommendation is to use the <code>revert</code> type, and a footer that references the commit SHAs that are being reverted:</p>\n<pre><code>revert: let us never again speak of the noodle incident\n\nRefs: 676104e, a215868\n</code></pre>\n </article>\n</main><footer class=\"footer\">\n <div class=\"container\">\n \n <div class=\"footer__license\">\n \n <p>License</p>\n \n \n <a href=\"https://creativecommons.org/licenses/by/3.0/\" target=\"_blank\">Creative Commons - CC BY 3.0</a>\n \n </div>\n <a href=\"https://www.netlify.com\">\n <img src=\"https://www.netlify.com/img/global/badges/netlify-light.svg\">\n </a>\n \n <div class=\"footer__logos\">\n \n \n <a class=\"footer__logo\" href=\"https://github.com/conventional-commits/conventionalcommits.org\"><svg class=\"github\" viewBox=\"0 0 128 128\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M64 5.103c-33.347 0-60.388 27.035-60.388 60.388 0 26.682 17.303 49.317 41.297 57.303 3.017.56 4.125-1.31 4.125-2.905 0-1.44-.056-6.197-.082-11.243-16.8 3.653-20.345-7.125-20.345-7.125-2.747-6.98-6.705-8.836-6.705-8.836-5.48-3.748.413-3.67.413-3.67 6.063.425 9.257 6.223 9.257 6.223 5.386 9.23 14.127 6.562 17.573 5.02.542-3.903 2.107-6.568 3.834-8.076-13.413-1.525-27.514-6.704-27.514-29.843 0-6.593 2.36-11.98 6.223-16.21-.628-1.52-2.695-7.662.584-15.98 0 0 5.07-1.623 16.61 6.19C53.7 35 58.867 34.327 64 34.304c5.13.023 10.3.694 15.127 2.033 11.526-7.813 16.59-6.19 16.59-6.19 3.287 8.317 1.22 14.46.593 15.98 3.872 4.23 6.215 9.617 6.215 16.21 0 23.194-14.127 28.3-27.574 29.796 2.167 1.874 4.097 5.55 4.097 11.183 0 8.08-.07 14.583-.07 16.572 0 1.607 1.088 3.49 4.148 2.897 23.98-7.994 41.263-30.622 41.263-57.294C124.388 32.14 97.35 5.104 64 5.104z\"></path>\n <path d=\"M26.484 91.806c-.133.3-.605.39-1.035.185-.44-.196-.685-.605-.543-.906.13-.31.603-.395 1.04-.188.44.197.69.61.537.91zm-.743-.55M28.93 94.535c-.287.267-.85.143-1.232-.28-.396-.42-.47-.983-.177-1.254.298-.266.844-.14 1.24.28.394.426.472.984.17 1.255zm-.575-.618M31.312 98.012c-.37.258-.976.017-1.35-.52-.37-.538-.37-1.183.01-1.44.373-.258.97-.025 1.35.507.368.545.368 1.19-.01 1.452zm0 0M34.573 101.373c-.33.365-1.036.267-1.552-.23-.527-.487-.674-1.18-.343-1.544.336-.366 1.045-.264 1.564.23.527.486.686 1.18.333 1.543zm0 0M39.073 103.324c-.147.473-.825.688-1.51.486-.683-.207-1.13-.76-.99-1.238.14-.477.823-.7 1.512-.485.683.206 1.13.756.988 1.237zm0 0M44.016 103.685c.017.498-.563.91-1.28.92-.723.017-1.308-.387-1.315-.877 0-.503.568-.91 1.29-.924.717-.013 1.306.387 1.306.88zm0 0M48.614 102.903c.086.485-.413.984-1.126 1.117-.7.13-1.35-.172-1.44-.653-.086-.498.422-.997 1.122-1.126.714-.123 1.354.17 1.444.663zm0 0\"></path>\n</svg>\n</a>\n \n \n </div>\n </div>\n</footer>\n<script src=\"/js/bundle.js\"></script>\n\n\n</body></html>",
|
|
3
|
+
"markdown": "# Conventional Commits 1.0.0\n\n## [Anchor](\\#summary) Summary\n\nThe Conventional Commits specification is a lightweight convention on top of commit messages.\nIt provides an easy set of rules for creating an explicit commit history;\nwhich makes it easier to write automated tools on top of.\nThis convention dovetails with [SemVer](http://semver.org),\nby describing the features, fixes, and breaking changes made in commit messages.\n\nThe commit message should be structured as follows:\n\n* * *\n\n```\n<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer(s)]\n\n```\n\n* * *\n\nThe commit contains the following structural elements, to communicate intent to the\nconsumers of your library:\n\n1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with [`PATCH`](http://semver.org/#summary) in Semantic Versioning).\n2. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with [`MINOR`](http://semver.org/#summary) in Semantic Versioning).\n3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning).\n A BREAKING CHANGE can be part of commits of any _type_.\n4. _types_ other than `fix:` and `feat:` are allowed, for example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) (based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) recommends `build:`, `chore:`,\n `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.\n5. _footers_ other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to\n [git trailer format](https://git-scm.com/docs/git-interpret-trailers).\n\nAdditional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE).\n\nA scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.\n\n## [Anchor](\\#examples) Examples\n\n### [Anchor](\\#commit-message-with-description-and-breaking-change-footer) Commit message with description and breaking change footer\n\n```\nfeat: allow provided config object to extend other configs\n\nBREAKING CHANGE: `extends` key in config file is now used for extending other config files\n\n```\n\n### [Anchor](\\#commit-message-with--to-draw-attention-to-breaking-change) Commit message with `!` to draw attention to breaking change\n\n```\nfeat!: send an email to the customer when a product is shipped\n\n```\n\n### [Anchor](\\#commit-message-with-scope-and--to-draw-attention-to-breaking-change) Commit message with scope and `!` to draw attention to breaking change\n\n```\nfeat(api)!: send an email to the customer when a product is shipped\n\n```\n\n### [Anchor](\\#commit-message-with-both--and-breaking-change-footer) Commit message with both `!` and BREAKING CHANGE footer\n\n```\nchore!: drop support for Node 6\n\nBREAKING CHANGE: use JavaScript features not available in Node 6.\n\n```\n\n### [Anchor](\\#commit-message-with-no-body) Commit message with no body\n\n```\ndocs: correct spelling of CHANGELOG\n\n```\n\n### [Anchor](\\#commit-message-with-scope) Commit message with scope\n\n```\nfeat(lang): add Polish language\n\n```\n\n### [Anchor](\\#commit-message-with-multi-paragraph-body-and-multiple-footers) Commit message with multi-paragraph body and multiple footers\n\n```\nfix: prevent racing of requests\n\nIntroduce a request id and a reference to latest request. Dismiss\nincoming responses other than from latest request.\n\nRemove timeouts which were used to mitigate the racing issue but are\nobsolete now.\n\nReviewed-by: Z\nRefs: #123\n\n```\n\n## [Anchor](\\#specification) Specification\n\nThe key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).\n\n01. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed\n by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space.\n02. The type `feat` MUST be used when a commit adds a new feature to your application or library.\n03. The type `fix` MUST be used when a commit represents a bug fix for your application.\n04. A scope MAY be provided after a type. A scope MUST consist of a noun describing a\n section of the codebase surrounded by parenthesis, e.g., `fix(parser):`\n05. A description MUST immediately follow the colon and space after the type/scope prefix.\n The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_.\n06. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.\n07. A commit body is free-form and MAY consist of any number of newline separated paragraphs.\n08. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of\n a word token, followed by either a `:<space>` or `<space>#` separator, followed by a string value (this is inspired by the\n [git trailer convention](https://git-scm.com/docs/git-interpret-trailers)).\n09. A footer’s token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate\n the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.\n10. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer\n token/separator pair is observed.\n11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the\n footer.\n12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,\n _BREAKING CHANGE: environment variables now take precedence over config files_.\n13. If included in the type/scope prefix, breaking changes MUST be indicated by a\n `!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section,\n and the commit description SHALL be used to describe the breaking change.\n14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._\n15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.\n16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.\n\n## [Anchor](\\#why-use-conventional-commits) Why Use Conventional Commits\n\n- Automatically generating CHANGELOGs.\n- Automatically determining a semantic version bump (based on the types of commits landed).\n- Communicating the nature of changes to teammates, the public, and other stakeholders.\n- Triggering build and publish processes.\n- Making it easier for people to contribute to your projects, by allowing them to explore\n a more structured commit history.\n\n## [Anchor](\\#faq) FAQ\n\n### [Anchor](\\#how-should-i-deal-with-commit-messages-in-the-initial-development-phase) How should I deal with commit messages in the initial development phase?\n\nWe recommend that you proceed as if you’ve already released the product. Typically _somebody_, even if it’s your fellow software developers, is using your software. They’ll want to know what’s fixed, what breaks etc.\n\n### [Anchor](\\#are-the-types-in-the-commit-title-uppercase-or-lowercase) Are the types in the commit title uppercase or lowercase?\n\nAny casing may be used, but it’s best to be consistent.\n\n### [Anchor](\\#what-do-i-do-if-the-commit-conforms-to-more-than-one-of-the-commit-types) What do I do if the commit conforms to more than one of the commit types?\n\nGo back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.\n\n### [Anchor](\\#doesnt-this-discourage-rapid-development-and-fast-iteration) Doesn’t this discourage rapid development and fast iteration?\n\nIt discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.\n\n### [Anchor](\\#might-conventional-commits-lead-developers-to-limit-the-type-of-commits-they-make-because-theyll-be-thinking-in-the-types-provided) Might Conventional Commits lead developers to limit the type of commits they make because they’ll be thinking in the types provided?\n\nConventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.\n\n### [Anchor](\\#how-does-this-relate-to-semver) How does this relate to SemVer?\n\n`fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.\n\n### [Anchor](\\#how-should-i-version-my-extensions-to-the-conventional-commits-specification-eg-jameswomackconventional-commit-spec) How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?\n\nWe recommend using SemVer to release your own extensions to this specification (and\nencourage you to make these extensions!)\n\n### [Anchor](\\#what-do-i-do-if-i-accidentally-use-the-wrong-commit-type) What do I do if I accidentally use the wrong commit type?\n\n#### [Anchor](\\#when-you-used-a-type-thats-of-the-spec-but-not-the-correct-type-eg-fix-instead-of-feat) When you used a type that’s of the spec but not the correct type, e.g. `fix` instead of `feat`\n\nPrior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.\n\n#### [Anchor](\\#when-you-used-a-type-not-of-the-spec-eg-feet-instead-of-feat) When you used a type _not_ of the spec, e.g. `feet` instead of `feat`\n\nIn a worst case scenario, it’s not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.\n\n### [Anchor](\\#do-all-my-contributors-need-to-use-the-conventional-commits-specification) Do all my contributors need to use the Conventional Commits specification?\n\nNo! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they’re merged—adding no workload to casual committers.\nA common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.\n\n### [Anchor](\\#how-does-conventional-commits-handle-revert-commits) How does Conventional Commits handle revert commits?\n\nReverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?\n\nConventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling\nauthors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts.\n\nOne recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:\n\n```\nrevert: let us never again speak of the noodle incident\n\nRefs: 676104e, a215868\n\n```\n\n- Versions - [v1.0.0](/en/v1.0.0)\n - [v1.0.0-beta.4](/en/v1.0.0-beta.4)\n - [v1.0.0-beta.3](/en/v1.0.0-beta.3)\n - [v1.0.0-beta.2](/en/v1.0.0-beta.2)\n - [v1.0.0-beta.1](/en/v1.0.0-beta.1)\n - [v1.0.0-beta](/en/v1.0.0-beta)\n- Languages - [English](/en/)\n - [Italian](/it/)\n - [Polish](/pl/)\n - [简体中文](/zh-hans/)\n - [繁體中文](/zh-hant/)\n - [Spanish](/es/)\n - [Русский](/ru/)\n - [日本語](/ja/)\n - [Français](/fr/)\n - [한국어](/ko/)\n - [Português Brasileiro](/pt-br/)\n - [Indonesia](/id/)\n - [Հայերեն](/hy/)\n - [Deutsch](/de/)\n - [ไทย](/th/)\n - [Ukrainian - Українська](/uk/)\n - [Belarusian - Беларуская](/be/)\n - [Türkçe](/tr/)\n - [Nederlands](/nl/)\n - [Malayalam - മലയാളം](/ml/)\n - [Romanian](/ro/)\n - [বাংলা (Bengali)](/bn/)\n - [Uzbek (O'zbekcha)](/uz/)\n - [العربية](/ar/)\n- [About](/en/about)\n\n# Conventional Commits\n\nA specification for adding human and machine readable meaning to commit messages\n\n[Quick Summary](#summary) [Full Specification](#specification) [Contribute](https://github.com/conventional-commits/conventionalcommits.org)\n\n\n\n# Conventional Commits 1.0.0\n\n## [Anchor](\\#summary) Summary\n\nThe Conventional Commits specification is a lightweight convention on top of commit messages.\nIt provides an easy set of rules for creating an explicit commit history;\nwhich makes it easier to write automated tools on top of.\nThis convention dovetails with [SemVer](http://semver.org),\nby describing the features, fixes, and breaking changes made in commit messages.\n\nThe commit message should be structured as follows:\n\n* * *\n\n```\n<type>[optional scope]: <description>\n\n[optional body]\n\n[optional footer(s)]\n\n```\n\n* * *\n\nThe commit contains the following structural elements, to communicate intent to the\nconsumers of your library:\n\n1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with [`PATCH`](http://semver.org/#summary) in Semantic Versioning).\n2. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with [`MINOR`](http://semver.org/#summary) in Semantic Versioning).\n3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with [`MAJOR`](http://semver.org/#summary) in Semantic Versioning).\n A BREAKING CHANGE can be part of commits of any _type_.\n4. _types_ other than `fix:` and `feat:` are allowed, for example [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) (based on the [Angular convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines)) recommends `build:`, `chore:`,\n `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.\n5. _footers_ other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to\n [git trailer format](https://git-scm.com/docs/git-interpret-trailers).\n\nAdditional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE).\n\nA scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.\n\n## [Anchor](\\#examples) Examples\n\n### [Anchor](\\#commit-message-with-description-and-breaking-change-footer) Commit message with description and breaking change footer\n\n```\nfeat: allow provided config object to extend other configs\n\nBREAKING CHANGE: `extends` key in config file is now used for extending other config files\n\n```\n\n### [Anchor](\\#commit-message-with--to-draw-attention-to-breaking-change) Commit message with `!` to draw attention to breaking change\n\n```\nfeat!: send an email to the customer when a product is shipped\n\n```\n\n### [Anchor](\\#commit-message-with-scope-and--to-draw-attention-to-breaking-change) Commit message with scope and `!` to draw attention to breaking change\n\n```\nfeat(api)!: send an email to the customer when a product is shipped\n\n```\n\n### [Anchor](\\#commit-message-with-both--and-breaking-change-footer) Commit message with both `!` and BREAKING CHANGE footer\n\n```\nchore!: drop support for Node 6\n\nBREAKING CHANGE: use JavaScript features not available in Node 6.\n\n```\n\n### [Anchor](\\#commit-message-with-no-body) Commit message with no body\n\n```\ndocs: correct spelling of CHANGELOG\n\n```\n\n### [Anchor](\\#commit-message-with-scope) Commit message with scope\n\n```\nfeat(lang): add Polish language\n\n```\n\n### [Anchor](\\#commit-message-with-multi-paragraph-body-and-multiple-footers) Commit message with multi-paragraph body and multiple footers\n\n```\nfix: prevent racing of requests\n\nIntroduce a request id and a reference to latest request. Dismiss\nincoming responses other than from latest request.\n\nRemove timeouts which were used to mitigate the racing issue but are\nobsolete now.\n\nReviewed-by: Z\nRefs: #123\n\n```\n\n## [Anchor](\\#specification) Specification\n\nThe key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).\n\n01. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed\n by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space.\n02. The type `feat` MUST be used when a commit adds a new feature to your application or library.\n03. The type `fix` MUST be used when a commit represents a bug fix for your application.\n04. A scope MAY be provided after a type. A scope MUST consist of a noun describing a\n section of the codebase surrounded by parenthesis, e.g., `fix(parser):`\n05. A description MUST immediately follow the colon and space after the type/scope prefix.\n The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_.\n06. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.\n07. A commit body is free-form and MAY consist of any number of newline separated paragraphs.\n08. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of\n a word token, followed by either a `:<space>` or `<space>#` separator, followed by a string value (this is inspired by the\n [git trailer convention](https://git-scm.com/docs/git-interpret-trailers)).\n09. A footer’s token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate\n the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.\n10. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer\n token/separator pair is observed.\n11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the\n footer.\n12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,\n _BREAKING CHANGE: environment variables now take precedence over config files_.\n13. If included in the type/scope prefix, breaking changes MUST be indicated by a\n `!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section,\n and the commit description SHALL be used to describe the breaking change.\n14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._\n15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.\n16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.\n\n## [Anchor](\\#why-use-conventional-commits) Why Use Conventional Commits\n\n- Automatically generating CHANGELOGs.\n- Automatically determining a semantic version bump (based on the types of commits landed).\n- Communicating the nature of changes to teammates, the public, and other stakeholders.\n- Triggering build and publish processes.\n- Making it easier for people to contribute to your projects, by allowing them to explore\n a more structured commit history.\n\n## [Anchor](\\#faq) FAQ\n\n### [Anchor](\\#how-should-i-deal-with-commit-messages-in-the-initial-development-phase) How should I deal with commit messages in the initial development phase?\n\nWe recommend that you proceed as if you’ve already released the product. Typically _somebody_, even if it’s your fellow software developers, is using your software. They’ll want to know what’s fixed, what breaks etc.\n\n### [Anchor](\\#are-the-types-in-the-commit-title-uppercase-or-lowercase) Are the types in the commit title uppercase or lowercase?\n\nAny casing may be used, but it’s best to be consistent.\n\n### [Anchor](\\#what-do-i-do-if-the-commit-conforms-to-more-than-one-of-the-commit-types) What do I do if the commit conforms to more than one of the commit types?\n\nGo back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.\n\n### [Anchor](\\#doesnt-this-discourage-rapid-development-and-fast-iteration) Doesn’t this discourage rapid development and fast iteration?\n\nIt discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.\n\n### [Anchor](\\#might-conventional-commits-lead-developers-to-limit-the-type-of-commits-they-make-because-theyll-be-thinking-in-the-types-provided) Might Conventional Commits lead developers to limit the type of commits they make because they’ll be thinking in the types provided?\n\nConventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.\n\n### [Anchor](\\#how-does-this-relate-to-semver) How does this relate to SemVer?\n\n`fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.\n\n### [Anchor](\\#how-should-i-version-my-extensions-to-the-conventional-commits-specification-eg-jameswomackconventional-commit-spec) How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?\n\nWe recommend using SemVer to release your own extensions to this specification (and\nencourage you to make these extensions!)\n\n### [Anchor](\\#what-do-i-do-if-i-accidentally-use-the-wrong-commit-type) What do I do if I accidentally use the wrong commit type?\n\n#### [Anchor](\\#when-you-used-a-type-thats-of-the-spec-but-not-the-correct-type-eg-fix-instead-of-feat) When you used a type that’s of the spec but not the correct type, e.g. `fix` instead of `feat`\n\nPrior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.\n\n#### [Anchor](\\#when-you-used-a-type-not-of-the-spec-eg-feet-instead-of-feat) When you used a type _not_ of the spec, e.g. `feet` instead of `feat`\n\nIn a worst case scenario, it’s not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.\n\n### [Anchor](\\#do-all-my-contributors-need-to-use-the-conventional-commits-specification) Do all my contributors need to use the Conventional Commits specification?\n\nNo! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they’re merged—adding no workload to casual committers.\nA common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.\n\n### [Anchor](\\#how-does-conventional-commits-handle-revert-commits) How does Conventional Commits handle revert commits?\n\nReverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?\n\nConventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling\nauthors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts.\n\nOne recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:\n\n```\nrevert: let us never again speak of the noodle incident\n\nRefs: 676104e, a215868\n\n```\n\nLicense\n\n[Creative Commons - CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)\n\n[](https://www.netlify.com)",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"url": "https://www.conventionalcommits.org/en/v1.0.0/",
|
|
6
|
+
"ogUrl": "/en/v1.0.0/",
|
|
7
|
+
"title": "Conventional Commits",
|
|
8
|
+
"og:url": "/en/v1.0.0/",
|
|
9
|
+
"og:type": "article",
|
|
10
|
+
"ogTitle": "Conventional Commits",
|
|
11
|
+
"og:title": "Conventional Commits",
|
|
12
|
+
"viewport": "width=device-width,minimum-scale=1,initial-scale=1,maximum-scale=1,user-scalable=no",
|
|
13
|
+
"sourceURL": "https://www.conventionalcommits.org/en/v1.0.0/",
|
|
14
|
+
"ogSiteName": "Conventional Commits",
|
|
15
|
+
"statusCode": 200,
|
|
16
|
+
"description": "A specification for adding human and machine readable meaning to commit messages",
|
|
17
|
+
"og:site_name": "Conventional Commits",
|
|
18
|
+
"twitter:card": "A specification for adding human and machine readable meaning to commit messages",
|
|
19
|
+
"ogDescription": "A specification for adding human and machine readable meaning to commit messages",
|
|
20
|
+
"twitter:title": "Conventional Commits",
|
|
21
|
+
"og:description": "A specification for adding human and machine readable meaning to commit messages",
|
|
22
|
+
"ogLocaleAlternate": [],
|
|
23
|
+
"twitter:description": "A specification for adding human and machine readable meaning to commit messages"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../src/commands/changelog.ts"],"names":[],"mappings":"AAIA,wBAAsB,SAAS,kBAiB9B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { mastra } from '../mastra/index.js';
|
|
3
|
+
export async function changelog() {
|
|
4
|
+
console.log(chalk.green("Hi! I'm Dane!"));
|
|
5
|
+
console.log(chalk.green('Lets make the changelog..\n'));
|
|
6
|
+
const workflow = mastra.getWorkflow('changelog');
|
|
7
|
+
const { start } = workflow.createRun();
|
|
8
|
+
const res = await start({
|
|
9
|
+
triggerData: {
|
|
10
|
+
channelId: process.env.CHANNEL_ID,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
console.log(res);
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-message.d.ts","sourceRoot":"","sources":["../../src/commands/commit-message.ts"],"names":[],"mappings":"AAKA,wBAAsB,oBAAoB,kBAkCzC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
import { mastra } from '../mastra/index.js';
|
|
4
|
+
export async function commitMessageCommand() {
|
|
5
|
+
console.log(chalk.green("Hi! I'm Dane!"));
|
|
6
|
+
console.log(chalk.green('Let me generate a commit message for you..\n'));
|
|
7
|
+
try {
|
|
8
|
+
const workflow = mastra.getWorkflow('commitMessage');
|
|
9
|
+
if (!workflow) {
|
|
10
|
+
console.error(chalk.red('Commit message workflow not found. Make sure it is properly set up.'));
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
// Get the current path
|
|
14
|
+
const currentPath = execSync('pwd', { encoding: 'utf-8' }).trim();
|
|
15
|
+
const { start } = workflow.createRun();
|
|
16
|
+
const result = await start({
|
|
17
|
+
triggerData: {
|
|
18
|
+
repoPath: currentPath,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const errorMessage = Object.values(result.results).find(result => result.status === 'failed')?.error;
|
|
22
|
+
if (result.results?.commit?.status !== 'success') {
|
|
23
|
+
console.error(chalk.red(`\n${errorMessage}`));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
console.log(chalk.green('\nCommit message generated and committed successfully'));
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
console.error(chalk.red('Error:', error?.message || 'An unknown error occurred'));
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,eAAO,MAAM,aAAa,SAiCtB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { ConfigManager } from '../config/index.js';
|
|
3
|
+
export const configCommand = new Command('config')
|
|
4
|
+
.description('Manage Dane configuration')
|
|
5
|
+
.option('--set <key=value>', 'Set a configuration value')
|
|
6
|
+
.option('--get <key>', 'Get a configuration value')
|
|
7
|
+
.option('--list', 'List all configuration values')
|
|
8
|
+
.option('--del <key>', 'Delete a configuration value')
|
|
9
|
+
.action(options => {
|
|
10
|
+
const configManager = new ConfigManager();
|
|
11
|
+
if (options.set) {
|
|
12
|
+
const [key, value] = options.set.split('=');
|
|
13
|
+
if (!key || !value) {
|
|
14
|
+
console.error('Invalid format. Use --set KEY=VALUE');
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
configManager.set(key, value);
|
|
18
|
+
console.log(`Set ${key} successfully`);
|
|
19
|
+
}
|
|
20
|
+
else if (options.get) {
|
|
21
|
+
const value = configManager.get(options.get);
|
|
22
|
+
if (value === undefined) {
|
|
23
|
+
console.log(`No value set for ${options.get}`);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
console.log(value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else if (options.del) {
|
|
30
|
+
configManager.delete(options.del);
|
|
31
|
+
console.log(`Deleted ${options.del} successfully`);
|
|
32
|
+
}
|
|
33
|
+
else if (options.list) {
|
|
34
|
+
const config = configManager.list();
|
|
35
|
+
console.log(JSON.stringify(config, null, 2));
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.log('No action specified. Use --help to see available options.');
|
|
39
|
+
}
|
|
40
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issue-labeler.d.ts","sourceRoot":"","sources":["../../src/commands/issue-labeler.ts"],"names":[],"mappings":"AAIA,wBAAsB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"issue-labeler.d.ts","sourceRoot":"","sources":["../../src/commands/issue-labeler.ts"],"names":[],"mappings":"AAIA,wBAAsB,mBAAmB,kBA8BxC"}
|
|
@@ -3,16 +3,33 @@ import { mastra } from '../mastra/index.js';
|
|
|
3
3
|
export async function issueLabelerCommand() {
|
|
4
4
|
console.log(chalk.green("Hi! I'm Dane!"));
|
|
5
5
|
console.log(chalk.green('Let me label this for you..\n'));
|
|
6
|
-
const
|
|
6
|
+
const { start } = mastra.getWorkflow('githubIssueLabeler').createRun();
|
|
7
|
+
const result = await start({
|
|
7
8
|
triggerData: {
|
|
8
9
|
issue_number: parseInt(process.env.ISSUE_NUMBER, 10),
|
|
9
10
|
owner: process.env.OWNER,
|
|
10
|
-
repo: process.env.REPO,
|
|
11
|
+
repo: normalizeRepo(process.env.REPO),
|
|
11
12
|
},
|
|
12
13
|
});
|
|
14
|
+
if (result.results?.labelIssue?.status === 'failed') {
|
|
15
|
+
console.error(chalk.red(`Error applying labels for issue: ${result.triggerData?.issue_number}`));
|
|
16
|
+
console.error({ error: result.results?.labelIssue?.error });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
13
19
|
if (result.results?.labelIssue?.status !== 'success') {
|
|
14
20
|
console.error(chalk.red(`Failed to apply labels for issue: ${result.triggerData?.issue_number}`));
|
|
15
21
|
return;
|
|
16
22
|
}
|
|
17
23
|
console.log(chalk.green(`Issue: ${result.triggerData?.issue_number} has been labeled with: ${result.results?.labelIssue?.payload?.labels.join(', ')}`));
|
|
18
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Extracts the repo name from owner/repo format provided by github
|
|
27
|
+
* @param repo - The repo name to normalize
|
|
28
|
+
* @returns The normalized repo name
|
|
29
|
+
*/
|
|
30
|
+
function normalizeRepo(repo) {
|
|
31
|
+
if (repo.includes('/')) {
|
|
32
|
+
return repo.split('/')[1] || repo;
|
|
33
|
+
}
|
|
34
|
+
return repo;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-checker.d.ts","sourceRoot":"","sources":["../../src/commands/link-checker.ts"],"names":[],"mappings":"AAIA,wBAAsB,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,iBAiBzD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { mastra } from '../mastra/index.js';
|
|
3
|
+
export async function linkChecker({ url }) {
|
|
4
|
+
console.log(chalk.green("Hi! I'm Dane!"));
|
|
5
|
+
console.log(chalk.green('Lets check the links...\n'));
|
|
6
|
+
const workflow = mastra.getWorkflow('linkChecker');
|
|
7
|
+
const { start } = workflow.createRun();
|
|
8
|
+
const res = await start({
|
|
9
|
+
triggerData: {
|
|
10
|
+
channelId: process.env.LINK_CHECKER_CHANNEL_ID,
|
|
11
|
+
targetUrl: url,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
console.log(res);
|
|
15
|
+
process.exit(0);
|
|
16
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/commands/message.ts"],"names":[],"mappings":"AAIA,wBAAsB,OAAO,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/commands/message.ts"],"names":[],"mappings":"AAIA,wBAAsB,OAAO,kBAgB5B"}
|
package/dist/commands/message.js
CHANGED
|
@@ -3,7 +3,9 @@ import { mastra } from '../mastra/index.js';
|
|
|
3
3
|
export async function message() {
|
|
4
4
|
console.log(chalk.green("Hi! I'm Dane!"));
|
|
5
5
|
console.log(chalk.green('What would you like to do today?\n'));
|
|
6
|
-
|
|
6
|
+
const { runId, start } = mastra.getWorkflow('message').createRun();
|
|
7
|
+
console.log(runId);
|
|
8
|
+
console.log(await start({
|
|
7
9
|
triggerData: {
|
|
8
10
|
resourceid: 'f8b5c3a1-d6e7-4f9c-b2a3-1d8e4c7f9b5a',
|
|
9
11
|
threadId: '2d9e8c7f-6b5a-4d3c-8f1e-9b7d5c3a2e8h',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-contributor-message.d.ts","sourceRoot":"","sources":["../../src/commands/new-contributor-message.ts"],"names":[],"mappings":"AAIA,wBAAsB,qBAAqB,kBAkC1C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { mastra } from '../mastra';
|
|
3
|
+
export async function newContributorMessage() {
|
|
4
|
+
console.log(chalk.green("Hi! I'm Dane!"));
|
|
5
|
+
console.log(chalk.green('Let me create a welcoming message..\n'));
|
|
6
|
+
try {
|
|
7
|
+
const workflow = mastra.getWorkflow('githubFirstContributorMessage');
|
|
8
|
+
if (!workflow) {
|
|
9
|
+
console.error(chalk.red('First contributor workflow not found. Make sure it is properly set up.'));
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
const { start } = workflow.createRun();
|
|
13
|
+
const result = await start({
|
|
14
|
+
triggerData: {
|
|
15
|
+
pr_number: parseInt(process.env.PR_NUMBER, 10),
|
|
16
|
+
owner: process.env.OWNER,
|
|
17
|
+
repo: normalizeRepo(process.env.REPO),
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
console.log(result);
|
|
21
|
+
const errorMessage = Object.values(result.results).find(result => result.status === 'failed')?.error;
|
|
22
|
+
if (result.results?.commit?.status !== 'success') {
|
|
23
|
+
console.error(chalk.red(`\n${errorMessage}`));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
console.log(chalk.green('\New contributor message generated and published successfully'));
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
console.error(chalk.red('Error:', error?.message || 'An unknown error occurred'));
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Extracts the repo name from owner/repo format provided by github
|
|
35
|
+
* @param repo - The repo name to normalize
|
|
36
|
+
* @returns The normalized repo name
|
|
37
|
+
*/
|
|
38
|
+
function normalizeRepo(repo) {
|
|
39
|
+
if (repo.includes('/')) {
|
|
40
|
+
return repo.split('/')[1] || repo;
|
|
41
|
+
}
|
|
42
|
+
return repo;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-packages.d.ts","sourceRoot":"","sources":["../../src/commands/publish-packages.ts"],"names":[],"mappings":"AAIA,wBAAsB,eAAe,kBAapC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { mastra } from '../mastra/index.js';
|
|
3
|
+
export async function publishPackages() {
|
|
4
|
+
console.log(chalk.green("Hi! I'm Dane!"));
|
|
5
|
+
console.log(chalk.green('Let me publish your packages..\n'));
|
|
6
|
+
const workflow = mastra.getWorkflow('packagePublisher');
|
|
7
|
+
const { start } = workflow.createRun();
|
|
8
|
+
const result = await start();
|
|
9
|
+
console.log(result);
|
|
10
|
+
process.exit(0);
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telephone-game.d.ts","sourceRoot":"","sources":["../../src/commands/telephone-game.ts"],"names":[],"mappings":"AAKA,wBAAsB,SAAS,kBAgC9B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { confirm } from '@inquirer/prompts';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { mastra } from '../mastra/index.js';
|
|
4
|
+
export async function telephone() {
|
|
5
|
+
console.log(chalk.green("Hi! I'm Dane!"));
|
|
6
|
+
console.log(chalk.green('Lets play telephone..\n'));
|
|
7
|
+
const workflow = mastra.getWorkflow('telephoneGame');
|
|
8
|
+
const { runId, start } = workflow.createRun();
|
|
9
|
+
await start();
|
|
10
|
+
await workflow.watch(runId, {
|
|
11
|
+
onTransition: async ({ activePaths, context }) => {
|
|
12
|
+
for (const path of activePaths) {
|
|
13
|
+
const ctx = context.stepResults?.[path.stepId]?.status;
|
|
14
|
+
if (ctx === 'suspended') {
|
|
15
|
+
// Handle suspension
|
|
16
|
+
if (path.stepId === 'stepC2' && ctx === 'suspended') {
|
|
17
|
+
const confirmed = await confirm({ message: 'Do you want to change the message?' });
|
|
18
|
+
if (confirmed) {
|
|
19
|
+
await workflow.resume({
|
|
20
|
+
stepId: path.stepId,
|
|
21
|
+
runId,
|
|
22
|
+
context: {
|
|
23
|
+
confirm: true,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ConfigManager {
|
|
2
|
+
private configPath;
|
|
3
|
+
constructor();
|
|
4
|
+
private ensureConfigExists;
|
|
5
|
+
get(key: string): string | undefined;
|
|
6
|
+
set(key: string, value: string): void;
|
|
7
|
+
delete(key: string): void;
|
|
8
|
+
list(): Record<string, string>;
|
|
9
|
+
getAnthropicApiKey(): string;
|
|
10
|
+
}
|
|
11
|
+
export declare const config: ConfigManager;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAIA,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAS;;IAS3B,OAAO,CAAC,kBAAkB;IAUnB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IASpC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAUrC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAYzB,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQ9B,kBAAkB,IAAI,MAAM;CAiBpC;AAGD,eAAO,MAAM,MAAM,eAAsB,CAAC"}
|