@ggdna/dna-gg 0.1.0
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 +21 -0
- package/README.md +76 -0
- package/dna/_dna.json +10 -0
- package/dna/_generated.json +204 -0
- package/dna/_vars.json +9 -0
- package/dna/doc/guides/develop-guide.md +41 -0
- package/dna/doc/guides/develop-without-ai-guide.md +63 -0
- package/dna/doc/guides/for-ai/ai-dev-guide.md +97 -0
- package/dna/doc/guides/install-guide/install-gg-guide.md +75 -0
- package/dna/doc/guides/install-guide/install-gg-workspace-guide.md +28 -0
- package/dna/doc/guides/install-guide.overrides.md +9 -0
- package/dna/dot-claude/skills/cleanup/SKILL.md +49 -0
- package/dna/dot-claude/skills/commit/SKILL.md +37 -0
- package/dna/dot-claude/skills/publish/SKILL.md +39 -0
- package/dna/dot-claude/skills/push/SKILL.md +21 -0
- package/dna/dot-claude/skills/ticket/SKILL.md +47 -0
- package/dna/dot-github/workflows/quick_check.yaml +20 -0
- package/dna/scripts/delete-feature-branch.js +97 -0
- package/dna/scripts/functions/colors.js +27 -0
- package/dna/scripts/functions/current-branch.js +11 -0
- package/dna/scripts/functions/directories.js +22 -0
- package/dna/scripts/functions/get-repo-urls.js +43 -0
- package/dna/scripts/functions/get-version.js +14 -0
- package/dna/scripts/functions/is-clean-repo.js +51 -0
- package/dna/scripts/functions/is-main-up-to-date.js +19 -0
- package/dna/scripts/functions/pull-request-url.js +17 -0
- package/dna/scripts/functions/run-command.js +22 -0
- package/dna/scripts/functions/sync-folders.js +46 -0
- package/dna/scripts/rename-class.js +147 -0
- package/dna/scripts/setup-github-repo.js +221 -0
- package/dna/scripts/wait-for-pr.js +90 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) ggsuite
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# dna_gg
|
|
2
|
+
|
|
3
|
+
The DNA layer for the `gg` CLI workflow: ticket, commit, push, review,
|
|
4
|
+
publish.
|
|
5
|
+
|
|
6
|
+
## Guides
|
|
7
|
+
|
|
8
|
+
- `dna/doc/guides/develop-guide.md`,
|
|
9
|
+
`dna/doc/guides/develop-without-ai-guide.md` — the ticket driven
|
|
10
|
+
workflow, with and without an AI
|
|
11
|
+
- `dna/doc/guides/for-ai/ai-dev-guide.md` — the same workflow as
|
|
12
|
+
instructions for an agent
|
|
13
|
+
- `dna/doc/guides/install-guide/install-gg-guide.md`,
|
|
14
|
+
`dna/doc/guides/install-guide/install-gg-workspace-guide.md` — install
|
|
15
|
+
`gg` and set up a workspace
|
|
16
|
+
|
|
17
|
+
## Skills
|
|
18
|
+
|
|
19
|
+
- `/ticket` — creates a ticket and adds the repos it needs
|
|
20
|
+
- `/commit` — proposes a message and commits through `gg do commit`
|
|
21
|
+
- `/push` — pushes the ticket branches
|
|
22
|
+
- `/publish` — releases the ticket
|
|
23
|
+
- `/cleanup` — removes what the ticket left behind
|
|
24
|
+
|
|
25
|
+
## Scripts
|
|
26
|
+
|
|
27
|
+
- `dna/scripts/setup-github-repo.js` — applies the branch rules a new repo
|
|
28
|
+
needs, called by the create repo guide
|
|
29
|
+
- `dna/scripts/rename-class.js` — renames a template project to its real
|
|
30
|
+
name
|
|
31
|
+
- `dna/scripts/wait-for-pr.js` — waits for the pull request to merge
|
|
32
|
+
- `dna/scripts/delete-feature-branch.js` — removes the branch after the
|
|
33
|
+
merge
|
|
34
|
+
- `dna/scripts/functions/` — the helpers those scripts share
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
- `dna/dot-github/workflows/quick_check.yaml` — the quick check pipeline
|
|
39
|
+
every pull request has to pass
|
|
40
|
+
|
|
41
|
+
## Layers
|
|
42
|
+
|
|
43
|
+
Builds on [dna_install](https://github.com/ggdna/dna_install) for the
|
|
44
|
+
install overview and [dna_index](https://github.com/ggdna/dna_index) for
|
|
45
|
+
the repo index every gg repo keeps.
|
|
46
|
+
|
|
47
|
+
It extends the `@tooling` section of the install overview through
|
|
48
|
+
`dna/doc/guides/install-guide.overrides.md`: it adds `Install gg` and
|
|
49
|
+
appends the `Workspace` section.
|
|
50
|
+
|
|
51
|
+
## Variables
|
|
52
|
+
|
|
53
|
+
- `dnaCopyrightHolder` — the name in the license header of every file
|
|
54
|
+
- `dnaCompany`, `dnaGitOrg`, `dnaGitOrgUrl` — the organization repos are
|
|
55
|
+
created in
|
|
56
|
+
- `dnaJiraPrefix` — the prefix of a ticket id
|
|
57
|
+
- `dnaGitQuickCheckPipelineName` — the name the branch rules require
|
|
58
|
+
- `dnaPubDevPublisher` — the pub.dev publisher packages are transferred to
|
|
59
|
+
|
|
60
|
+
## Usage
|
|
61
|
+
|
|
62
|
+
Declare it as a dev-dependency and initialize once:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pnpm add -D @ggdna/dna-gg # TypeScript projects
|
|
66
|
+
dart pub add dev:dna_gg # Dart projects
|
|
67
|
+
helix init
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The placed test instantiates and verifies the DNA on every test run.
|
|
71
|
+
|
|
72
|
+
## Development
|
|
73
|
+
|
|
74
|
+
The `dna/` folder is hand-authored source and is never generated. The repo
|
|
75
|
+
instantiates its own DNA — run `dart test` after changes; commit first, a
|
|
76
|
+
file the DNA would overwrite must not carry uncommitted work.
|
package/dna/_dna.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
// This package is a DNA layer: dna/ is hand-authored source and is the
|
|
3
|
+
// last layer of its own instantiation.
|
|
4
|
+
"version": 1,
|
|
5
|
+
|
|
6
|
+
// The parent DNAs. dna_install brings the install overview this layer
|
|
7
|
+
// extends with the gg install guides, dna_index the index conventions
|
|
8
|
+
// every gg repo follows. Parents first, this layer wins.
|
|
9
|
+
"layers": ["dna_install", "dna_index"]
|
|
10
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"layers": [
|
|
4
|
+
{
|
|
5
|
+
"name": "base",
|
|
6
|
+
"package": "helix",
|
|
7
|
+
"ecosystem": null,
|
|
8
|
+
"resolvedVersion": "1.0.1",
|
|
9
|
+
"via": null,
|
|
10
|
+
"hash": "0x705e486e88a93125"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "dna-install",
|
|
14
|
+
"package": "@ggdna/dna-install",
|
|
15
|
+
"ecosystem": "node",
|
|
16
|
+
"resolvedVersion": "0.1.0",
|
|
17
|
+
"via": null,
|
|
18
|
+
"hash": "0xbe88eb4256745ee1"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "dna-index",
|
|
22
|
+
"package": "@ggdna/dna-index",
|
|
23
|
+
"ecosystem": "node",
|
|
24
|
+
"resolvedVersion": "0.1.0",
|
|
25
|
+
"via": null,
|
|
26
|
+
"hash": "0x1d92b0add37a1ac7"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "self",
|
|
30
|
+
"package": null,
|
|
31
|
+
"ecosystem": null,
|
|
32
|
+
"resolvedVersion": null,
|
|
33
|
+
"via": null,
|
|
34
|
+
"hash": "0x2a90594a14522652"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"claude": {
|
|
38
|
+
"claudeMdInclude": null
|
|
39
|
+
},
|
|
40
|
+
"baseVersion": "1.0.1",
|
|
41
|
+
"baseHash": "0x705e486e88a93125",
|
|
42
|
+
"instances": [
|
|
43
|
+
{
|
|
44
|
+
"path": ".claude/skills/cleanup/SKILL.md",
|
|
45
|
+
"hash": "0xc5c7b7940ab51b83"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": ".claude/skills/commit/SKILL.md",
|
|
49
|
+
"hash": "0xad0e75ab4d725133"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"path": ".claude/skills/index/SKILL.md",
|
|
53
|
+
"hash": "0xc47429e51622cd7b"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"path": ".claude/skills/install/SKILL.md",
|
|
57
|
+
"hash": "0x29c4ded946b50053"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": ".claude/skills/publish/SKILL.md",
|
|
61
|
+
"hash": "0xb8e70eff3563f75d"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"path": ".claude/skills/push/SKILL.md",
|
|
65
|
+
"hash": "0x76c357ca9933317d"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"path": ".claude/skills/ticket/SKILL.md",
|
|
69
|
+
"hash": "0xbc13efe6fa9af962"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": ".github/workflows/quick_check.yaml",
|
|
73
|
+
"hash": "0xa61b5062f48e430c"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"path": "doc/guides/develop-guide.md",
|
|
77
|
+
"hash": "0xbd9fa5efab7af735"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"path": "doc/guides/develop-without-ai-guide.md",
|
|
81
|
+
"hash": "0xe74449f72357f23c"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"path": "doc/guides/for-ai/ai-dev-guide.md",
|
|
85
|
+
"hash": "0x3d2812a1dfb025cf"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"path": "doc/guides/index-guide.md",
|
|
89
|
+
"hash": "0xc684cc8895b98403"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"path": "doc/guides/install-guide.md",
|
|
93
|
+
"hash": "0x4c0b8fb54b2c4636"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "doc/guides/install-guide/install-azure-cli-guide.md",
|
|
97
|
+
"hash": "0xe0206afa5fc5b085"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"path": "doc/guides/install-guide/install-azure-npm-feed-guide.md",
|
|
101
|
+
"hash": "0x902df0b6dc38a92b"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"path": "doc/guides/install-guide/install-brew-on-mac-guide.md",
|
|
105
|
+
"hash": "0x5bf663dc011c4330"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"path": "doc/guides/install-guide/install-corepack-guide.md",
|
|
109
|
+
"hash": "0x906ecd19a3b2366b"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"path": "doc/guides/install-guide/install-flutter-guide.md",
|
|
113
|
+
"hash": "0x883c40d890bd3d5e"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"path": "doc/guides/install-guide/install-gg-guide.md",
|
|
117
|
+
"hash": "0xa093431b02c398d6"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"path": "doc/guides/install-guide/install-gg-workspace-guide.md",
|
|
121
|
+
"hash": "0x846766914bb56a84"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"path": "doc/guides/install-guide/install-github-cli-guide.md",
|
|
125
|
+
"hash": "0xcce9cbcd56f78b1f"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"path": "doc/guides/install-guide/install-node-mac-guide.md",
|
|
129
|
+
"hash": "0x1f4eb7cf63b5c9db"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"path": "doc/guides/install-guide/install-node-win-guide.md",
|
|
133
|
+
"hash": "0x782756eb0ff83a0d"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"path": "doc/guides/install-guide/install-vscode-guide.md",
|
|
137
|
+
"hash": "0xa0da6a6877bb94c2"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"path": "doc/hello_world.md",
|
|
141
|
+
"hash": "0x0903f7fc5224f6f1"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"path": "doc/templates/index-template.jsonc",
|
|
145
|
+
"hash": "0x16c3a8d50c72ed6d"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"path": "scripts/delete-feature-branch.js",
|
|
149
|
+
"hash": "0x219ac0a3635ee644"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"path": "scripts/functions/colors.js",
|
|
153
|
+
"hash": "0xdfd97f3804665811"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"path": "scripts/functions/current-branch.js",
|
|
157
|
+
"hash": "0xb9ebbadf45893278"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"path": "scripts/functions/directories.js",
|
|
161
|
+
"hash": "0x148d4ebb8aa75523"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"path": "scripts/functions/get-repo-urls.js",
|
|
165
|
+
"hash": "0x4c7b3897973acec3"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"path": "scripts/functions/get-version.js",
|
|
169
|
+
"hash": "0xfe46316558755cf2"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"path": "scripts/functions/is-clean-repo.js",
|
|
173
|
+
"hash": "0x8aa95ca51d9d6517"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"path": "scripts/functions/is-main-up-to-date.js",
|
|
177
|
+
"hash": "0xe1ab1826d0ddd039"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"path": "scripts/functions/pull-request-url.js",
|
|
181
|
+
"hash": "0x5398755a61a59928"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"path": "scripts/functions/run-command.js",
|
|
185
|
+
"hash": "0x085b390fcb9256ab"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"path": "scripts/functions/sync-folders.js",
|
|
189
|
+
"hash": "0x4f83165fd92ec49d"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"path": "scripts/rename-class.js",
|
|
193
|
+
"hash": "0xa9daec4f3ea514b7"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"path": "scripts/setup-github-repo.js",
|
|
197
|
+
"hash": "0x5907588070a580ca"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"path": "scripts/wait-for-pr.js",
|
|
201
|
+
"hash": "0x1360c661984b78a8"
|
|
202
|
+
}
|
|
203
|
+
]
|
|
204
|
+
}
|
package/dna/_vars.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) dnaCopyrightHolder
|
|
4
|
+
|
|
5
|
+
Use of this source code is governed by terms that can be
|
|
6
|
+
found in the LICENSE file in the root of this package.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# Development guide
|
|
10
|
+
|
|
11
|
+
[Install the required software](./install-guide.md)
|
|
12
|
+
|
|
13
|
+
[Prepare a GG workspace](./install-guide/install-gg-workspace-guide.md)
|
|
14
|
+
|
|
15
|
+
Switch into the workspace
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cd ~/dev/ # workspace
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Start claude
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
claude
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Start the development in Claude
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
/ticket
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use the following skills in Claude
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
/commit
|
|
37
|
+
/push
|
|
38
|
+
/review
|
|
39
|
+
/publish
|
|
40
|
+
/cleanup
|
|
41
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) dnaCopyrightHolder
|
|
4
|
+
|
|
5
|
+
Use of this source code is governed by terms that can be
|
|
6
|
+
found in the LICENSE file in the root of this package.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# Develop without AI
|
|
10
|
+
|
|
11
|
+
## Prepare everything
|
|
12
|
+
|
|
13
|
+
If you have not done that yet:
|
|
14
|
+
|
|
15
|
+
[Install the required software](./install-guide.md)
|
|
16
|
+
|
|
17
|
+
[Initialize a gg workspace](./install-guide/install-gg-workspace-guide.md)
|
|
18
|
+
|
|
19
|
+
## Switch into your workspace
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cd ~/dev/
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Add tickets
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
gg do add repo1 repo2
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Open the workspace in Vscode
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
gg do code
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Implement
|
|
38
|
+
|
|
39
|
+
Implement your features based on the guides
|
|
40
|
+
|
|
41
|
+
## Commit
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
gg do commit
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Push
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
gg do push
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Review
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
gg do review
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Publish
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
gg do publish
|
|
63
|
+
```
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) dnaCopyrightHolder
|
|
4
|
+
|
|
5
|
+
Use of this source code is governed by terms that can be
|
|
6
|
+
found in the LICENSE file in the root of this package.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# Development guide for AIs
|
|
10
|
+
|
|
11
|
+
## Ask the developer for the ticket infos
|
|
12
|
+
|
|
13
|
+
- Ask for the ticket ID
|
|
14
|
+
- Ask for the ticket title
|
|
15
|
+
- Ask for the ticket description
|
|
16
|
+
|
|
17
|
+
## Replace in this document
|
|
18
|
+
|
|
19
|
+
- Replace `~/dev/` by the workspace directory from the memory
|
|
20
|
+
- Ask for the workspace directory if none is known
|
|
21
|
+
- Replace `dnaJiraPrefix-145` by the ticket ID you asked for
|
|
22
|
+
- Replace `Fix issue abc` by the ticket title you asked for
|
|
23
|
+
|
|
24
|
+
## Create a ticket
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cd ~/dev/ # workspace
|
|
28
|
+
gg do create ticket dnaJiraPrefix-145 -m"Fix issue abc"
|
|
29
|
+
cd tickets/dnaJiraPrefix-145
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Add git repositories
|
|
33
|
+
|
|
34
|
+
Look at the `index.jsonc` of each repo in .ocean and decide which repos need to
|
|
35
|
+
be added to the ticket.
|
|
36
|
+
Make a plan for how you roughly want to implement the ticket.
|
|
37
|
+
If certain parts of the implementation belong to a domain that does not yet
|
|
38
|
+
exist in the .ocean folder, consider creating a new repository.
|
|
39
|
+
Ask the user about this. Also explain to the user what you roughly want to
|
|
40
|
+
change in which repo to implement the ticket and let them confirm that the
|
|
41
|
+
corresponding repos are added to the ticket.
|
|
42
|
+
|
|
43
|
+
After the user's confirmation, add the repos to the ticket:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
gg do add repo1 repo2
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Open the workspace in Vscode
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
gg do code
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Implement
|
|
56
|
+
|
|
57
|
+
Implement your features based on the guides
|
|
58
|
+
|
|
59
|
+
## Commit
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
gg do commit
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Push
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
gg do push
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Review
|
|
72
|
+
|
|
73
|
+
Let the user confirm that the review phase is started.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
gg do review
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
gg creates pull requests for each repo and prints the URLs to the
|
|
80
|
+
terminal.
|
|
81
|
+
|
|
82
|
+
Afterwards load the review-light skill and execute it.
|
|
83
|
+
|
|
84
|
+
## Publish
|
|
85
|
+
|
|
86
|
+
- Create a blog post for the current ticket
|
|
87
|
+
- Update the index.jsonc and README.md
|
|
88
|
+
- Create the configuration for gg do publish
|
|
89
|
+
|
|
90
|
+
Ask the user to run the following command **manually**:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
gg do publish
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
gg triggers the pull request merge and publishes the changes to the
|
|
97
|
+
registry. Finally the version tag is created and pushed.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) dnaCopyrightHolder
|
|
4
|
+
|
|
5
|
+
Use of this source code is governed by terms that can be
|
|
6
|
+
found in the LICENSE file in the root of this package.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# Install gg
|
|
10
|
+
|
|
11
|
+
`gg` is the unified Dart CLI used for development at dnaCompany. It runs
|
|
12
|
+
pre-commit checks in a single repository and orchestrates commits, pushes,
|
|
13
|
+
reviews and publishes across all repositories of a ticket.
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
Install [Flutter](./install-flutter-guide.md) first. It provides the `dart`
|
|
18
|
+
command used below.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
dart --version
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Install gg
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dart pub global activate gg
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Add the pub cache to your PATH
|
|
31
|
+
|
|
32
|
+
Globally activated Dart executables are installed into the pub cache. Add its
|
|
33
|
+
`bin` folder to your `PATH`, otherwise the `gg` command will not be found.
|
|
34
|
+
|
|
35
|
+
Mac and Linux:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
echo 'export PATH="$HOME/.pub-cache/bin:$PATH"' >> ~/.zshrc
|
|
39
|
+
source ~/.zshrc
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
On Windows, add the following folder to your `Path` environment variable:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
%LOCALAPPDATA%\Pub\Cache\bin
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Restart your terminal afterwards.
|
|
49
|
+
|
|
50
|
+
## Verify installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
gg --help
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Update gg
|
|
57
|
+
|
|
58
|
+
Run the activation again to install the latest version:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
dart pub global activate gg
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Usage
|
|
65
|
+
|
|
66
|
+
`gg` is ticket driven: run it inside a ticket and every action applies to
|
|
67
|
+
all repositories that belong to that ticket.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
gg # the command groups: do, can, did
|
|
71
|
+
gg do -h # everything you can act on
|
|
72
|
+
gg can commit # check before committing
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
See also the [Develop Guide](../develop-guide.md).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@license
|
|
3
|
+
Copyright (c) dnaCopyrightHolder
|
|
4
|
+
|
|
5
|
+
Use of this source code is governed by terms that can be
|
|
6
|
+
found in the LICENSE file in the root of this package.
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
# Create a gg workspace
|
|
10
|
+
|
|
11
|
+
## Create a dev dir
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
mkdir -p ~/dev2
|
|
15
|
+
cd ~/dev2
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Init a gg workspace
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
gg do init workspace
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Add your repositories
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
gg do add dnaOrgUrl
|
|
28
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## @tooling Tooling
|
|
2
|
+
|
|
3
|
+
- [Install the GitHub CLI](./install-guide/install-github-cli-guide.md)
|
|
4
|
+
- [Install Flutter](./install-guide/install-flutter-guide.md)
|
|
5
|
+
- [Install gg](./install-guide/install-gg-guide.md)
|
|
6
|
+
|
|
7
|
+
## Workspace
|
|
8
|
+
|
|
9
|
+
- [Create a gg workspace](./install-guide/install-gg-workspace-guide.md)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cleanup
|
|
3
|
+
description: Removes what a published ticket left behind — feature branches, the ticket folder, and a stale workspace. Use when the user says "/cleanup" or asks to clean up after a release.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Clean up after the publish
|
|
7
|
+
|
|
8
|
+
Run this only when the ticket is published. `gg do publish` already offers to
|
|
9
|
+
delete the ticket and its remote feature branches — if the user accepted
|
|
10
|
+
that, only step 4 is left.
|
|
11
|
+
|
|
12
|
+
## 1. Verify that everything landed
|
|
13
|
+
|
|
14
|
+
Per repo of the ticket:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git status --porcelain # must be empty
|
|
18
|
+
git log origin/main --oneline -3
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Stop and report if a repo still holds uncommitted or unmerged work.
|
|
22
|
+
|
|
23
|
+
## 2. Delete the feature branches
|
|
24
|
+
|
|
25
|
+
In every repo that still sits on its feature branch:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
node scripts/delete-feature-branch.js
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The script switches to `main`, pulls, and deletes the branch only when it is
|
|
32
|
+
fully merged.
|
|
33
|
+
|
|
34
|
+
## 3. Remove the ticket folder
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd ~/dev/ # workspace
|
|
38
|
+
rm -rf tickets/DnaJiraPrefix-145
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 4. Update the workspace
|
|
42
|
+
|
|
43
|
+
Pull `main` in the repos the ticket touched, so the workspace matches the
|
|
44
|
+
release.
|
|
45
|
+
|
|
46
|
+
## Important
|
|
47
|
+
|
|
48
|
+
- Never delete a ticket whose pull requests are still open.
|
|
49
|
+
- Ask before removing the ticket folder — it may still hold notes.
|