@radicaltools/cli 0.6.1 → 0.6.2
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/dist/{chunk-SBQRTX3Y.js → chunk-5EK2V6G3.js} +1 -1
- package/dist/{dist-LSHMW73I.js → dist-BJQ35APN.js} +2 -2
- package/dist/hub-catalogue/concern/concern-accessibility.radical +85 -1
- package/dist/hub-catalogue/concern/concern-api-collections.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-errors.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-evolution.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-idempotency.radical +121 -3
- package/dist/hub-catalogue/concern/concern-api-resource-design.radical +78 -1
- package/dist/hub-catalogue/concern/concern-api-style-guide.radical +78 -1
- package/dist/hub-catalogue/concern/concern-architecture-style.radical +83 -7
- package/dist/hub-catalogue/concern/concern-audit-trail.radical +77 -1
- package/dist/hub-catalogue/concern/concern-authentication.radical +178 -8
- package/dist/hub-catalogue/concern/concern-authorization.radical +133 -7
- package/dist/hub-catalogue/concern/concern-availability.radical +156 -6
- package/dist/hub-catalogue/concern/concern-backend-stack.radical +71 -8
- package/dist/hub-catalogue/concern/concern-backup-recovery.radical +136 -6
- package/dist/hub-catalogue/concern/concern-caching.radical +73 -1
- package/dist/hub-catalogue/concern/concern-capacity.radical +124 -5
- package/dist/hub-catalogue/concern/concern-ci-cd-pipeline.radical +154 -15
- package/dist/hub-catalogue/concern/concern-code-documentation.radical +131 -13
- package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +116 -7
- package/dist/hub-catalogue/concern/concern-code-review-branching.radical +174 -13
- package/dist/hub-catalogue/concern/concern-code-style.radical +148 -16
- package/dist/hub-catalogue/concern/concern-communication-style.radical +94 -7
- package/dist/hub-catalogue/concern/concern-data-classification.radical +77 -1
- package/dist/hub-catalogue/concern/concern-data-consistency.radical +87 -5
- package/dist/hub-catalogue/concern/concern-data-store.radical +87 -5
- package/dist/hub-catalogue/concern/concern-decomposition.radical +78 -1
- package/dist/hub-catalogue/concern/concern-definition-of-done.radical +150 -11
- package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +130 -5
- package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +127 -10
- package/dist/hub-catalogue/concern/concern-deployment.radical +113 -9
- package/dist/hub-catalogue/concern/concern-encryption.radical +146 -5
- package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +118 -12
- package/dist/hub-catalogue/concern/concern-eu-dora.radical +69 -1
- package/dist/hub-catalogue/concern/concern-frontend-stack.radical +148 -9
- package/dist/hub-catalogue/concern/concern-incident-management.radical +122 -1
- package/dist/hub-catalogue/concern/concern-infrastructure.radical +54 -1
- package/dist/hub-catalogue/concern/concern-integration-resilience.radical +110 -5
- package/dist/hub-catalogue/concern/concern-messaging.radical +89 -2
- package/dist/hub-catalogue/concern/concern-mobile-performance.radical +67 -1
- package/dist/hub-catalogue/concern/concern-module-boundaries.radical +92 -5
- package/dist/hub-catalogue/concern/concern-observability.radical +105 -1
- package/dist/hub-catalogue/concern/concern-operational-readiness.radical +140 -5
- package/dist/hub-catalogue/concern/concern-personal-data.radical +206 -7
- package/dist/hub-catalogue/concern/concern-quality-priorities.radical +104 -12
- package/dist/hub-catalogue/concern/concern-rate-limiting.radical +110 -1
- package/dist/hub-catalogue/concern/concern-release-versioning.radical +99 -7
- package/dist/hub-catalogue/concern/concern-retention.radical +130 -9
- package/dist/hub-catalogue/concern/concern-secrets.radical +196 -12
- package/dist/hub-catalogue/concern/concern-secure-coding.radical +122 -1
- package/dist/hub-catalogue/concern/concern-secure-development.radical +118 -1
- package/dist/hub-catalogue/concern/concern-security-detection.radical +124 -1
- package/dist/hub-catalogue/concern/concern-supply-chain.radical +116 -1
- package/dist/hub-catalogue/concern/concern-technical-debt.radical +162 -19
- package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +152 -18
- package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +111 -1
- package/dist/hub-catalogue/concern/concern-test-strategy.radical +83 -7
- package/dist/hub-catalogue/concern/concern-threat-modelling.radical +120 -1
- package/dist/hub-catalogue/concern/concern-usability.radical +84 -5
- package/dist/index.js +68 -18
- package/dist/{pdfjs-WWNLOMK2.js → pdfjs-4U3YUAVN.js} +1 -1
- package/dist/{undici-53QU2XSN.js → undici-7IHHEPSO.js} +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,66 @@
|
|
|
18
18
|
"id": "code-review-branching",
|
|
19
19
|
"trigger": "LIST NODES WHERE (type = \"container\" OR type = \"webapp\") AND external != true",
|
|
20
20
|
"why": "code lives in these elements and several people change it, so how a change is branched, reviewed and merged has to be decided; one decision usually covers a whole repository and is bound to every element built from it.",
|
|
21
|
-
"group": "sdlc"
|
|
21
|
+
"group": "sdlc",
|
|
22
|
+
"scope": {
|
|
23
|
+
"group": "sdlc",
|
|
24
|
+
"questions": [
|
|
25
|
+
{
|
|
26
|
+
"key": "USE",
|
|
27
|
+
"label": "What is the software for?",
|
|
28
|
+
"default": "business",
|
|
29
|
+
"hint": "Software for one's own use can be built by hand; an organisation that runs or ships it needs a repeatable way to build, release and deploy.",
|
|
30
|
+
"options": [
|
|
31
|
+
{
|
|
32
|
+
"value": "personal",
|
|
33
|
+
"label": "our own or home use",
|
|
34
|
+
"description": "A hobby project or a tool for oneself or a household; nobody else depends on it."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"value": "business",
|
|
38
|
+
"label": "a system an organisation runs",
|
|
39
|
+
"description": "A company or public body runs it for its staff or customers (an internal tool, an online shop, a booking system)."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"value": "product",
|
|
43
|
+
"label": "a product we ship to others",
|
|
44
|
+
"description": "Software sold or handed to customers who install or run it themselves, or offered to many organisations."
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"key": "TEAM",
|
|
50
|
+
"label": "Who builds it?",
|
|
51
|
+
"default": "small",
|
|
52
|
+
"hint": "Review, a Definition of Done and delivery metrics need more than one or two people.",
|
|
53
|
+
"options": [
|
|
54
|
+
{
|
|
55
|
+
"value": "small",
|
|
56
|
+
"label": "one or two people",
|
|
57
|
+
"description": "One or two developers."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"value": "team",
|
|
61
|
+
"label": "a team",
|
|
62
|
+
"description": "A team of its own."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"value": "teams",
|
|
66
|
+
"label": "several teams",
|
|
67
|
+
"description": "Several teams contributing to it."
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"when": [
|
|
73
|
+
{
|
|
74
|
+
"TEAM": [
|
|
75
|
+
"team",
|
|
76
|
+
"teams"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
22
81
|
},
|
|
23
82
|
"sources": [
|
|
24
83
|
{
|
|
@@ -124,7 +183,13 @@
|
|
|
124
183
|
"label": "collective ownership with rotating reviewers",
|
|
125
184
|
"description": "Anyone may change and review anything; a reviewer is assigned round-robin from the team so that reviews spread and knowledge does too. Pick it for one team of up to about eight on one codebase, where naming owners per directory would create bottlenecks."
|
|
126
185
|
}
|
|
127
|
-
]
|
|
186
|
+
],
|
|
187
|
+
"scopeWhen": {
|
|
188
|
+
"TEAM": [
|
|
189
|
+
"team",
|
|
190
|
+
"teams"
|
|
191
|
+
]
|
|
192
|
+
}
|
|
128
193
|
},
|
|
129
194
|
{
|
|
130
195
|
"key": "SIZE",
|
|
@@ -143,7 +208,13 @@
|
|
|
143
208
|
"label": "no limit, with the size reported",
|
|
144
209
|
"description": "The changed-line count is posted on every pull request but nothing blocks; a reviewer may send a large change back. Pick it for a small, disciplined team where large changes are rare and already questioned."
|
|
145
210
|
}
|
|
146
|
-
]
|
|
211
|
+
],
|
|
212
|
+
"scopeWhen": {
|
|
213
|
+
"TEAM": [
|
|
214
|
+
"team",
|
|
215
|
+
"teams"
|
|
216
|
+
]
|
|
217
|
+
}
|
|
147
218
|
},
|
|
148
219
|
{
|
|
149
220
|
"key": "COMMITS",
|
|
@@ -162,7 +233,13 @@
|
|
|
162
233
|
"label": "free-form subjects, squash-merged",
|
|
163
234
|
"description": "A subject line under 72 characters in the imperative, a body that says why; pull requests are squash-merged so the integration branch holds one commit per change with its pull request number. Pick it when nothing is derived from the messages and the pull request, not the commit, is the unit of history."
|
|
164
235
|
}
|
|
165
|
-
]
|
|
236
|
+
],
|
|
237
|
+
"scopeWhen": {
|
|
238
|
+
"TEAM": [
|
|
239
|
+
"team",
|
|
240
|
+
"teams"
|
|
241
|
+
]
|
|
242
|
+
}
|
|
166
243
|
},
|
|
167
244
|
{
|
|
168
245
|
"key": "MAX_PR_LINES",
|
|
@@ -255,6 +332,10 @@
|
|
|
255
332
|
"hubWhen": {
|
|
256
333
|
"REVIEW": [
|
|
257
334
|
"two-critical"
|
|
335
|
+
],
|
|
336
|
+
"SIZE": [
|
|
337
|
+
"limit",
|
|
338
|
+
"none"
|
|
258
339
|
]
|
|
259
340
|
}
|
|
260
341
|
},
|
|
@@ -271,6 +352,10 @@
|
|
|
271
352
|
"hubWhen": {
|
|
272
353
|
"REVIEW": [
|
|
273
354
|
"pairing"
|
|
355
|
+
],
|
|
356
|
+
"SIZE": [
|
|
357
|
+
"limit",
|
|
358
|
+
"none"
|
|
274
359
|
]
|
|
275
360
|
}
|
|
276
361
|
},
|
|
@@ -283,7 +368,13 @@
|
|
|
283
368
|
"ears_type": "event-driven",
|
|
284
369
|
"trigger": "a pull request is marked ready for review",
|
|
285
370
|
"action": "give it a first review, review comment or comment from someone other than the author within {{REVIEW_HOURS}} working hours, with the median over the pull requests merged in the last 30 days under {{REVIEW_HOURS}} working hours and the 90th percentile under one working day (8 hours)",
|
|
286
|
-
"rationale": "A review that waits a day stalls the change, grows it while it waits, and pushes the author to start another branch; Google asks for a reply within one business day at most and prefers hours (Google, Speed of Code Reviews; DORA, lead time for changes)."
|
|
371
|
+
"rationale": "A review that waits a day stalls the change, grows it while it waits, and pushes the author to start another branch; Google asks for a reply within one business day at most and prefers hours (Google, Speed of Code Reviews; DORA, lead time for changes).",
|
|
372
|
+
"hubWhen": {
|
|
373
|
+
"SIZE": [
|
|
374
|
+
"limit",
|
|
375
|
+
"none"
|
|
376
|
+
]
|
|
377
|
+
}
|
|
287
378
|
},
|
|
288
379
|
{
|
|
289
380
|
"id": "req-owner-approval",
|
|
@@ -358,7 +449,13 @@
|
|
|
358
449
|
"ears_type": "unwanted-behaviour",
|
|
359
450
|
"unwanted_condition": "a branch other than main, develop or a release or hotfix branch has not been merged {{MAX_BRANCH_DAYS}} days after its first commit",
|
|
360
451
|
"action": "flag it in the daily report with its last author, so that it is merged, split or deleted; bot branches (renovate/, dependabot/) are listed apart and not counted",
|
|
361
|
-
"rationale": "The cost of a merge grows with the time apart; a branch older than a few days is already a merge nobody wants to do (Hammant, Trunk Based Development: short-lived feature branches; DORA: lead time)."
|
|
452
|
+
"rationale": "The cost of a merge grows with the time apart; a branch older than a few days is already a merge nobody wants to do (Hammant, Trunk Based Development: short-lived feature branches; DORA: lead time).",
|
|
453
|
+
"hubWhen": {
|
|
454
|
+
"SIZE": [
|
|
455
|
+
"limit",
|
|
456
|
+
"none"
|
|
457
|
+
]
|
|
458
|
+
}
|
|
362
459
|
},
|
|
363
460
|
{
|
|
364
461
|
"id": "req-conventional",
|
|
@@ -402,6 +499,10 @@
|
|
|
402
499
|
"hubWhen": {
|
|
403
500
|
"BRANCHING": [
|
|
404
501
|
"trunk"
|
|
502
|
+
],
|
|
503
|
+
"SIZE": [
|
|
504
|
+
"limit",
|
|
505
|
+
"none"
|
|
405
506
|
]
|
|
406
507
|
}
|
|
407
508
|
},
|
|
@@ -433,6 +534,10 @@
|
|
|
433
534
|
"hubWhen": {
|
|
434
535
|
"BRANCHING": [
|
|
435
536
|
"gitflow"
|
|
537
|
+
],
|
|
538
|
+
"SIZE": [
|
|
539
|
+
"limit",
|
|
540
|
+
"none"
|
|
436
541
|
]
|
|
437
542
|
}
|
|
438
543
|
},
|
|
@@ -489,6 +594,10 @@
|
|
|
489
594
|
"hubWhen": {
|
|
490
595
|
"REVIEW": [
|
|
491
596
|
"two-critical"
|
|
597
|
+
],
|
|
598
|
+
"SIZE": [
|
|
599
|
+
"limit",
|
|
600
|
+
"none"
|
|
492
601
|
]
|
|
493
602
|
}
|
|
494
603
|
},
|
|
@@ -504,6 +613,10 @@
|
|
|
504
613
|
"hubWhen": {
|
|
505
614
|
"REVIEW": [
|
|
506
615
|
"pairing"
|
|
616
|
+
],
|
|
617
|
+
"SIZE": [
|
|
618
|
+
"limit",
|
|
619
|
+
"none"
|
|
507
620
|
]
|
|
508
621
|
}
|
|
509
622
|
},
|
|
@@ -515,7 +628,13 @@
|
|
|
515
628
|
"y": 650,
|
|
516
629
|
"given": "the pull requests merged in the last 30 days",
|
|
517
630
|
"when": "the working hours from ready-for-review to the first review or comment by someone else are computed from each timeline",
|
|
518
|
-
"then": "the median is under {{REVIEW_HOURS}} working hours and the 90th percentile under 8"
|
|
631
|
+
"then": "the median is under {{REVIEW_HOURS}} working hours and the 90th percentile under 8",
|
|
632
|
+
"hubWhen": {
|
|
633
|
+
"SIZE": [
|
|
634
|
+
"limit",
|
|
635
|
+
"none"
|
|
636
|
+
]
|
|
637
|
+
}
|
|
519
638
|
},
|
|
520
639
|
{
|
|
521
640
|
"id": "sc-owner-approval",
|
|
@@ -585,7 +704,13 @@
|
|
|
585
704
|
"y": 1300,
|
|
586
705
|
"given": "a branch whose first commit is {{MAX_BRANCH_DAYS}} + 1 days old and unmerged",
|
|
587
706
|
"when": "the daily branch report runs",
|
|
588
|
-
"then": "the branch is listed with its author and age, and renovate/ and dependabot/ branches appear in a separate list"
|
|
707
|
+
"then": "the branch is listed with its author and age, and renovate/ and dependabot/ branches appear in a separate list",
|
|
708
|
+
"hubWhen": {
|
|
709
|
+
"SIZE": [
|
|
710
|
+
"limit",
|
|
711
|
+
"none"
|
|
712
|
+
]
|
|
713
|
+
}
|
|
589
714
|
},
|
|
590
715
|
{
|
|
591
716
|
"id": "sc-conventional",
|
|
@@ -629,6 +754,10 @@
|
|
|
629
754
|
"hubWhen": {
|
|
630
755
|
"BRANCHING": [
|
|
631
756
|
"trunk"
|
|
757
|
+
],
|
|
758
|
+
"SIZE": [
|
|
759
|
+
"limit",
|
|
760
|
+
"none"
|
|
632
761
|
]
|
|
633
762
|
}
|
|
634
763
|
},
|
|
@@ -659,6 +788,10 @@
|
|
|
659
788
|
"hubWhen": {
|
|
660
789
|
"BRANCHING": [
|
|
661
790
|
"gitflow"
|
|
791
|
+
],
|
|
792
|
+
"SIZE": [
|
|
793
|
+
"limit",
|
|
794
|
+
"none"
|
|
662
795
|
]
|
|
663
796
|
}
|
|
664
797
|
},
|
|
@@ -672,7 +805,7 @@
|
|
|
672
805
|
"status": "accepted",
|
|
673
806
|
"date": "",
|
|
674
807
|
"context": "Several people change the code of this element every day, and every change travels from one machine to the main branch through a branch, a review and a merge. The forces: a branch that lives long drifts from main and merges with pain, but one merged within hours needs a way to hide unfinished work; a review catches the mistakes tests do not describe, but a review that waits a day stalls every change behind it and a review of 2,000 lines catches almost nothing (SmartBear: defect density falls off past about 400 lines); the people who know a directory best are not always free to review it; the history of main is what the next incident is debugged from, so what a commit message says and whether history is linear matters a year later; and products shipped in numbered versions to customers who install them need branches for versions in support, which a service deployed continuously never does. The snippets assume GitHub (rulesets, the GitHub CLI and GraphQL API, GitHub Actions) and one repository layout with source in src/ and the workflow files under .github/workflows/.",
|
|
675
|
-
"decision": "The element is developed trunk-based on GitHub: a change is a branch of at most {{MAX_BRANCH_DAYS}} days merged to main through a short pull request, and unfinished work ships behind a feature flag (OpenFeature with the provider the Deployment decision names) or a branch by abstraction. Main is protected by a ruleset: no direct push or force push, required checks (the Code quality gate and Test strategy jobs), linear history by squash merge. Review: {{REVIEW}}.
|
|
808
|
+
"decision": "The element is developed trunk-based on GitHub: a change is a branch of at most {{MAX_BRANCH_DAYS}} days merged to main through a short pull request, and unfinished work ships behind a feature flag (OpenFeature with the provider the Deployment decision names) or a branch by abstraction. Main is protected by a ruleset: no direct push or force push, required checks (the Code quality gate and Test strategy jobs), linear history by squash merge. Review: {{REVIEW}}. A first review is due within {{REVIEW_HOURS}} working hours; a daily job lists branches older than {{MAX_BRANCH_DAYS}} days.",
|
|
676
809
|
"consequences": "• Merges are small and conflicts rare, because nobody is more than two days away from main; lead time for a change is hours.\n• Unfinished work needs flags or abstraction seams, and flags need clean-up (the Deployment pack's stale-flag check).\n• Every developer must split work into steps that each leave main releasable, which is a skill the team has to build.\n• There is no branch to stabilise a release on: the test suite and the rollout checks are the only safety net.",
|
|
677
810
|
"alternatives": "1. Feature branches with a pull request each: no flags needed for unfinished work, but branches live longer and merges hurt more.\n2. GitFlow: a branch per release, right for installed products, needless ceremony for a service deployed continuously.\n3. Direct commits to main without pull requests: faster still, but the review and the checks have nowhere to run before the code lands.",
|
|
678
811
|
"hubWhen": {
|
|
@@ -691,7 +824,7 @@
|
|
|
691
824
|
"status": "accepted",
|
|
692
825
|
"date": "",
|
|
693
826
|
"context": "Several people change the code of this element every day, and every change travels from one machine to the main branch through a branch, a review and a merge. The forces: a branch that lives long drifts from main and merges with pain, but one merged within hours needs a way to hide unfinished work; a review catches the mistakes tests do not describe, but a review that waits a day stalls every change behind it and a review of 2,000 lines catches almost nothing (SmartBear: defect density falls off past about 400 lines); the people who know a directory best are not always free to review it; the history of main is what the next incident is debugged from, so what a commit message says and whether history is linear matters a year later; and products shipped in numbered versions to customers who install them need branches for versions in support, which a service deployed continuously never does. The snippets assume GitHub (rulesets, the GitHub CLI and GraphQL API, GitHub Actions) and one repository layout with source in src/ and the workflow files under .github/workflows/.",
|
|
694
|
-
"decision": "Every change to the element is a branch from main and a pull request on GitHub, rebased on main before merge and merged by squash when reviewed and green; main is always releasable and nothing reaches it any other way. Branches stay under {{MAX_BRANCH_DAYS}} days, and a daily job flags the ones that do not. Main is protected by a ruleset: no direct push or force push, required checks (the Code quality gate and Test strategy jobs), linear history. Review: {{REVIEW}}.
|
|
827
|
+
"decision": "Every change to the element is a branch from main and a pull request on GitHub, rebased on main before merge and merged by squash when reviewed and green; main is always releasable and nothing reaches it any other way. Branches stay under {{MAX_BRANCH_DAYS}} days, and a daily job flags the ones that do not. Main is protected by a ruleset: no direct push or force push, required checks (the Code quality gate and Test strategy jobs), linear history. Review: {{REVIEW}}. A first review is due within {{REVIEW_HOURS}} working hours.",
|
|
695
828
|
"consequences": "• Every change gets its review and its checks before it lands; main is releasable at any commit.\n• Unfinished work can stay on its branch, so no feature flags are needed for it, but a branch past a week drifts and merges with pain: the age check is what keeps this model honest.\n• Two branches that touch the same files find out at merge time, later than trunk-based development would.\n• Pull requests are the unit of history and discussion; the squash commit links to it.",
|
|
696
829
|
"alternatives": "1. Trunk-based development: shorter lead time and fewer merge conflicts, at the price of feature flags and smaller steps.\n2. GitFlow: adds develop, release and hotfix branches that a continuously deployed service does not need.\n3. Long-lived feature branches merged when the feature is done: the merges become projects of their own and main stops reflecting the team's work.",
|
|
697
830
|
"hubWhen": {
|
|
@@ -710,7 +843,7 @@
|
|
|
710
843
|
"status": "accepted",
|
|
711
844
|
"date": "",
|
|
712
845
|
"context": "Several people change the code of this element every day, and every change travels from one machine to the main branch through a branch, a review and a merge. The forces: a branch that lives long drifts from main and merges with pain, but one merged within hours needs a way to hide unfinished work; a review catches the mistakes tests do not describe, but a review that waits a day stalls every change behind it and a review of 2,000 lines catches almost nothing (SmartBear: defect density falls off past about 400 lines); the people who know a directory best are not always free to review it; the history of main is what the next incident is debugged from, so what a commit message says and whether history is linear matters a year later; and products shipped in numbered versions to customers who install them need branches for versions in support, which a service deployed continuously never does. The snippets assume GitHub (rulesets, the GitHub CLI and GraphQL API, GitHub Actions) and one repository layout with source in src/ and the workflow files under .github/workflows/. Here the element ships in numbered versions that customers install and keep running, so a version in support needs a branch of its own to be fixed on.",
|
|
713
|
-
"decision": "The element follows GitFlow on GitHub: feature branches merge to develop through pull requests; a release/x.y branch is cut from develop for each version, takes fixes only, and is merged to main with a merge commit and an annotated tag vX.Y.Z and back into develop; a hotfix/x.y.z branch is cut from the tag on main and merged to both. Main and develop are protected by rulesets (no direct or force push, a pull request with an approval, required checks from the Code quality gate and Test strategy decisions); main accepts merges from release/* and hotfix/* only, so its history holds merge commits and is not linear. Review: {{REVIEW}}.
|
|
846
|
+
"decision": "The element follows GitFlow on GitHub: feature branches merge to develop through pull requests; a release/x.y branch is cut from develop for each version, takes fixes only, and is merged to main with a merge commit and an annotated tag vX.Y.Z and back into develop; a hotfix/x.y.z branch is cut from the tag on main and merged to both. Main and develop are protected by rulesets (no direct or force push, a pull request with an approval, required checks from the Code quality gate and Test strategy decisions); main accepts merges from release/* and hotfix/* only, so its history holds merge commits and is not linear. Review: {{REVIEW}}. Feature branches stay under {{MAX_BRANCH_DAYS}} days; a first review is due within {{REVIEW_HOURS}} working hours. The git-flow AVH command-line extension does the branching; a GitHub Actions job checks main's history and develop's protection.",
|
|
714
847
|
"consequences": "• Each supported version has a branch to fix on; customers on 2.3 get 2.3.1 without 2.4's features.\n• Two long-lived branches (main, develop) and a release branch per version mean double merges and the occasional fix forgotten on one side; the back-merge is checked, not trusted.\n• Integration happens on develop, later than on a trunk; the age limit on feature branches keeps it from drifting further.\n• The model's own author advises against it for software deployed continuously; if the element ever becomes a service, this decision is superseded by trunk-based development.",
|
|
715
848
|
"alternatives": "1. Trunk-based development with release branches cut from main and fixes cherry-picked back: fewer long-lived branches, enough for most versioned products (Hammant: branch for release).\n2. Feature branches with pull requests and tags on main only: no place to fix a version in support once main has moved on.\n3. One branch per customer version kept forever: unbounded maintenance.",
|
|
716
849
|
"hubWhen": {
|
|
@@ -872,7 +1005,13 @@
|
|
|
872
1005
|
"cadence": "triggered",
|
|
873
1006
|
"trigger": "nightly",
|
|
874
1007
|
"invocation": "automated",
|
|
875
|
-
"description": "A daily job lists every branch, computes the age of its first commit not on main, and fails naming the branches over the limit and their last authors; Renovate and Dependabot branches are listed separately so a stale dependency update does not hide a stale feature branch, and the other way round.\n\nThreshold: 0 branches older than {{MAX_BRANCH_DAYS}} days (first commit not on main) other than main, develop, release/* and hotfix/*; bot branches (renovate/, dependabot/) reported apart and not counted\n\nTool: git in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# daily: flags branches whose first own commit is older than the limit\nset -euo pipefail\nMAX={{MAX_BRANCH_DAYS}}\ngit fetch --prune origin '+refs/heads/*:refs/remotes/origin/*'\nnow=$(date +%s); stale=0\nfor b in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -Ev '/(main|develop|HEAD)$|/(release|hotfix)/'); do\n first=$(git log --format=%ct origin/main..\"$b\" | tail -1); [ -z \"$first\" ] && continue # oldest commit not on main\n age=$(( (now - first) / 86400 )); author=$(git log -1 --format=%an \"$b\")\n case \"$b\" in\n origin/renovate/*|origin/dependabot/*) echo \"bot: $b $age d\";;\n *) if [ \"$age\" -gt \"$MAX\" ]; then echo \"::error::$b is $age days old (last: $author); merge, split or delete it\"; stale=$((stale+1)); fi;;\n esac\ndone\n[ \"$stale\" -eq 0 ]\n```"
|
|
1008
|
+
"description": "A daily job lists every branch, computes the age of its first commit not on main, and fails naming the branches over the limit and their last authors; Renovate and Dependabot branches are listed separately so a stale dependency update does not hide a stale feature branch, and the other way round.\n\nThreshold: 0 branches older than {{MAX_BRANCH_DAYS}} days (first commit not on main) other than main, develop, release/* and hotfix/*; bot branches (renovate/, dependabot/) reported apart and not counted\n\nTool: git in a scheduled GitHub Actions job\n\n```bash\n#!/usr/bin/env bash\n# daily: flags branches whose first own commit is older than the limit\nset -euo pipefail\nMAX={{MAX_BRANCH_DAYS}}\ngit fetch --prune origin '+refs/heads/*:refs/remotes/origin/*'\nnow=$(date +%s); stale=0\nfor b in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -Ev '/(main|develop|HEAD)$|/(release|hotfix)/'); do\n first=$(git log --format=%ct origin/main..\"$b\" | tail -1); [ -z \"$first\" ] && continue # oldest commit not on main\n age=$(( (now - first) / 86400 )); author=$(git log -1 --format=%an \"$b\")\n case \"$b\" in\n origin/renovate/*|origin/dependabot/*) echo \"bot: $b $age d\";;\n *) if [ \"$age\" -gt \"$MAX\" ]; then echo \"::error::$b is $age days old (last: $author); merge, split or delete it\"; stale=$((stale+1)); fi;;\n esac\ndone\n[ \"$stale\" -eq 0 ]\n```",
|
|
1009
|
+
"hubWhen": {
|
|
1010
|
+
"SIZE": [
|
|
1011
|
+
"limit",
|
|
1012
|
+
"none"
|
|
1013
|
+
]
|
|
1014
|
+
}
|
|
876
1015
|
},
|
|
877
1016
|
{
|
|
878
1017
|
"id": "ff-commitlint",
|
|
@@ -946,7 +1085,13 @@
|
|
|
946
1085
|
"cadence": "triggered",
|
|
947
1086
|
"trigger": "weekly",
|
|
948
1087
|
"invocation": "automated",
|
|
949
|
-
"description": "A weekly job reads the last 100 merged pull requests through the GraphQL API, keeps the ones merged in the last 30 days, takes the later of each one's creation and its last ready-for-review event as the start and the first review (which also covers review comments) or conversation comment by someone other than the author as the end, counts working hours (Mon–Fri, 9–17 in the runner's TZ) between them, and fails on the percentiles; the numbers go to the team's dashboard beside the DORA lead time.\n\nThreshold: Over the pull requests merged in the last 30 days, working hours from ready-for-review to the first review, review comment or comment by someone else: median under {{REVIEW_HOURS}}, 90th percentile under 8\n\nTool: GitHub GraphQL API (gh api graphql) with a Node script\n\n```ts\n// scripts/review-turnaround.ts (weekly; TZ=Europe/Warsaw)\nimport { execFileSync } from 'node:child_process'\nconst REVIEW_HOURS = {{REVIEW_HOURS}}\nconst q = `query($owner:String!,$name:String!){ repository(owner:$owner,name:$name){\n pullRequests(first:100, states:MERGED, orderBy:{field:UPDATED_AT,direction:DESC}){ nodes{ number createdAt mergedAt author{login}\n timelineItems(itemTypes:[READY_FOR_REVIEW_EVENT,PULL_REQUEST_REVIEW,ISSUE_COMMENT], first:50){ nodes{ __typename\n ... on ReadyForReviewEvent{ createdAt } ... on PullRequestReview{ createdAt author{login} } ... on IssueComment{ createdAt author{login} } } } } } } }`\nconst [owner, name] = process.env.GITHUB_REPOSITORY!.split('/')\nconst data = JSON.parse(execFileSync('gh', ['api', 'graphql', '-f', `query=${q}`, '-F', `owner=${owner}`, '-F', `name=${name}`]).toString())\nconst workingHours = (from: Date, to: Date): number => { // Mon–Fri 9–17, hour by hour\n let h = 0\n for (const t = new Date(from); t < to; t.setHours(t.getHours() + 1)) if (t.getDay() >= 1 && t.getDay() <= 5 && t.getHours() >= 9 && t.getHours() < 17) h++\n return h\n}\nconst hours = data.data.repository.pullRequests.nodes\n .filter((pr: any) => Date.parse(pr.mergedAt) > Date.now() - 30 * 86_400_000)\n .flatMap((pr: any) => {\n const items = pr.timelineItems.nodes\n const ready = items.filter((i: any) => i.__typename === 'ReadyForReviewEvent').map((i: any) => i.createdAt).sort().pop() ?? pr.createdAt\n const first = items.find((i: any) => i.__typename !== 'ReadyForReviewEvent' && i.author?.login !== pr.author?.login && i.createdAt > ready)\n return first ? [workingHours(new Date(ready), new Date(first.createdAt))] : []\n }).sort((a: number, b: number) => a - b)\nconst p = (n: number) => hours[Math.floor(hours.length * n)] ?? 0\nconsole.log({ prs: hours.length, p50: p(0.5), p90: p(0.9) })\nif (p(0.5) > REVIEW_HOURS || p(0.9) > 8) process.exit(1)\n```"
|
|
1088
|
+
"description": "A weekly job reads the last 100 merged pull requests through the GraphQL API, keeps the ones merged in the last 30 days, takes the later of each one's creation and its last ready-for-review event as the start and the first review (which also covers review comments) or conversation comment by someone other than the author as the end, counts working hours (Mon–Fri, 9–17 in the runner's TZ) between them, and fails on the percentiles; the numbers go to the team's dashboard beside the DORA lead time.\n\nThreshold: Over the pull requests merged in the last 30 days, working hours from ready-for-review to the first review, review comment or comment by someone else: median under {{REVIEW_HOURS}}, 90th percentile under 8\n\nTool: GitHub GraphQL API (gh api graphql) with a Node script\n\n```ts\n// scripts/review-turnaround.ts (weekly; TZ=Europe/Warsaw)\nimport { execFileSync } from 'node:child_process'\nconst REVIEW_HOURS = {{REVIEW_HOURS}}\nconst q = `query($owner:String!,$name:String!){ repository(owner:$owner,name:$name){\n pullRequests(first:100, states:MERGED, orderBy:{field:UPDATED_AT,direction:DESC}){ nodes{ number createdAt mergedAt author{login}\n timelineItems(itemTypes:[READY_FOR_REVIEW_EVENT,PULL_REQUEST_REVIEW,ISSUE_COMMENT], first:50){ nodes{ __typename\n ... on ReadyForReviewEvent{ createdAt } ... on PullRequestReview{ createdAt author{login} } ... on IssueComment{ createdAt author{login} } } } } } } }`\nconst [owner, name] = process.env.GITHUB_REPOSITORY!.split('/')\nconst data = JSON.parse(execFileSync('gh', ['api', 'graphql', '-f', `query=${q}`, '-F', `owner=${owner}`, '-F', `name=${name}`]).toString())\nconst workingHours = (from: Date, to: Date): number => { // Mon–Fri 9–17, hour by hour\n let h = 0\n for (const t = new Date(from); t < to; t.setHours(t.getHours() + 1)) if (t.getDay() >= 1 && t.getDay() <= 5 && t.getHours() >= 9 && t.getHours() < 17) h++\n return h\n}\nconst hours = data.data.repository.pullRequests.nodes\n .filter((pr: any) => Date.parse(pr.mergedAt) > Date.now() - 30 * 86_400_000)\n .flatMap((pr: any) => {\n const items = pr.timelineItems.nodes\n const ready = items.filter((i: any) => i.__typename === 'ReadyForReviewEvent').map((i: any) => i.createdAt).sort().pop() ?? pr.createdAt\n const first = items.find((i: any) => i.__typename !== 'ReadyForReviewEvent' && i.author?.login !== pr.author?.login && i.createdAt > ready)\n return first ? [workingHours(new Date(ready), new Date(first.createdAt))] : []\n }).sort((a: number, b: number) => a - b)\nconst p = (n: number) => hours[Math.floor(hours.length * n)] ?? 0\nconsole.log({ prs: hours.length, p50: p(0.5), p90: p(0.9) })\nif (p(0.5) > REVIEW_HOURS || p(0.9) > 8) process.exit(1)\n```",
|
|
1089
|
+
"hubWhen": {
|
|
1090
|
+
"SIZE": [
|
|
1091
|
+
"limit",
|
|
1092
|
+
"none"
|
|
1093
|
+
]
|
|
1094
|
+
}
|
|
950
1095
|
},
|
|
951
1096
|
{
|
|
952
1097
|
"id": "ff-critical-two-approvals",
|
|
@@ -963,6 +1108,10 @@
|
|
|
963
1108
|
"hubWhen": {
|
|
964
1109
|
"REVIEW": [
|
|
965
1110
|
"two-critical"
|
|
1111
|
+
],
|
|
1112
|
+
"SIZE": [
|
|
1113
|
+
"limit",
|
|
1114
|
+
"none"
|
|
966
1115
|
]
|
|
967
1116
|
}
|
|
968
1117
|
},
|
|
@@ -981,6 +1130,10 @@
|
|
|
981
1130
|
"hubWhen": {
|
|
982
1131
|
"REVIEW": [
|
|
983
1132
|
"pairing"
|
|
1133
|
+
],
|
|
1134
|
+
"SIZE": [
|
|
1135
|
+
"limit",
|
|
1136
|
+
"none"
|
|
984
1137
|
]
|
|
985
1138
|
}
|
|
986
1139
|
},
|
|
@@ -999,6 +1152,10 @@
|
|
|
999
1152
|
"hubWhen": {
|
|
1000
1153
|
"BRANCHING": [
|
|
1001
1154
|
"gitflow"
|
|
1155
|
+
],
|
|
1156
|
+
"SIZE": [
|
|
1157
|
+
"limit",
|
|
1158
|
+
"none"
|
|
1002
1159
|
]
|
|
1003
1160
|
}
|
|
1004
1161
|
},
|
|
@@ -1017,6 +1174,10 @@
|
|
|
1017
1174
|
"hubWhen": {
|
|
1018
1175
|
"BRANCHING": [
|
|
1019
1176
|
"trunk"
|
|
1177
|
+
],
|
|
1178
|
+
"SIZE": [
|
|
1179
|
+
"limit",
|
|
1180
|
+
"none"
|
|
1020
1181
|
]
|
|
1021
1182
|
}
|
|
1022
1183
|
}
|