git-digger 1.6.5 → 1.7.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/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Digger CLI
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
6
|
+
A program for extracting 'contribution data' from git repositories into JSON files.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
You can install the tool using any NPM-like system.
|
|
11
|
+
|
|
12
|
+
### Local Example
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm i -D git-digger # this will install it into a project as a dev dependency
|
|
16
|
+
|
|
17
|
+
npx digger current-contribution-data $(pwd) # You can use npx to run a project's programs easily
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Global Example
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm i -g git-digger # this will install it globally into npm
|
|
24
|
+
|
|
25
|
+
digger current-contribution-data $(pwd) # Now it should be available via NPM's path on your shell.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Commands
|
|
29
|
+
|
|
30
|
+
### CurrentContributionData
|
|
31
|
+
|
|
32
|
+
The `currentContributionData` task will collect the most recent contribution to the repository.
|
|
33
|
+
|
|
34
|
+
The most recent contribution is calculated by looking for the most recent, non-HEAD tag, and then including every commit after that until the current HEAD.
|
|
35
|
+
|
|
36
|
+
#### Output
|
|
37
|
+
|
|
38
|
+
The contribution data JSON is created at `./currentContributionData.json`.
|
|
39
|
+
|
|
40
|
+
It will include all fields listed [here](../digger-json/src/commonMain/kotlin/com/zegreatrob/tools/digger/json/ContributionDataJson.kt).
|
|
41
|
+
|
|
42
|
+
Any "Instant" in the specification is an ISO 8601 date-time. Any Duration is an ISO 8601 duration.
|
|
43
|
+
|
|
44
|
+
### AllContributionData
|
|
45
|
+
|
|
46
|
+
The `allContributionData` task will collect all the contributions in the git repository.
|
|
47
|
+
|
|
48
|
+
This is calculated by subdividing the repository by its tags, and each section becomes a contribution.
|
|
49
|
+
|
|
50
|
+
#### Output
|
|
51
|
+
|
|
52
|
+
The contribution data JSON is created at `./allContributionData.json`, as a JSON array.
|
|
53
|
+
|
|
54
|
+
It will include all fields listed [here](../digger-json/src/commonMain/kotlin/com/zegreatrob/tools/digger/json/ContributionDataJson.kt).
|
|
55
|
+
|
|
56
|
+
Any "Instant" in the specification is an ISO 8601 date-time. Any Duration is an ISO 8601 duration.
|
|
57
|
+
|
|
58
|
+
## Fields of Interest
|
|
59
|
+
|
|
60
|
+
### Authors
|
|
61
|
+
|
|
62
|
+
This will include all authors listed on the commit, including committer, author, and co-authors.
|
|
63
|
+
|
|
64
|
+
### Story ID
|
|
65
|
+
|
|
66
|
+
This is parsed out of the commit message by looking for square bracketed text that does not match semver.
|
|
67
|
+
|
|
68
|
+
eg:
|
|
69
|
+
commit message: `[Cowdog-42] [patch] I did that thing`
|
|
70
|
+
produces: { storyId: "Cowdog-42" }
|
|
71
|
+
|
|
72
|
+
### Semver
|
|
73
|
+
|
|
74
|
+
This is parsed out of the commit message by looking for the strings "[major]", "[minor]", "[patch]", or "[none]".
|
|
75
|
+
|
|
76
|
+
eg:
|
|
77
|
+
commit message: `[Cowdog-42] [patch] I did that thing`
|
|
78
|
+
produces: { semver: "Patch" }
|
|
79
|
+
|
|
80
|
+
### Label
|
|
81
|
+
|
|
82
|
+
All contributions from one repository will share the same label. By default, this will be the Gradle project's name.
|
|
83
|
+
|
|
84
|
+
This can be overridden by argument:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
digger currentContributionData --label SomethingMoreExciting ${pwd}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Ease
|
|
91
|
+
|
|
92
|
+
This is parsed out of the commit message by looking for a number between one and five, wrapped in dashes.
|
|
93
|
+
|
|
94
|
+
This field is inspired by https://www.scrumexpert.com/knowledge/measuring-joy-for-software-developers/
|
|
95
|
+
|
|
96
|
+
eg:
|
|
97
|
+
commit message: `-3- I did that thing`
|
|
98
|
+
produces: { ease: 3 }
|
|
99
|
+
|
|
100
|
+
## Help
|
|
101
|
+
|
|
102
|
+
For a full listing of the available options in the program, please use the built-in help command.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
digger --help
|
|
106
|
+
```
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
return tmp;
|
|
354
354
|
}
|
|
355
355
|
initMetadataForInterface(AbstractWithOffsetBuilder, 'AbstractWithOffsetBuilder', VOID, VOID, [WithUtcOffset]);
|
|
356
|
-
initMetadataForClass(Builder, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateTimeBuilder, AbstractWithOffsetBuilder,
|
|
356
|
+
initMetadataForClass(Builder, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateTimeBuilder, AbstractWithOffsetBuilder, WithTime, WithDate, WithUtcOffset]);
|
|
357
357
|
initMetadataForClass(AbstractDateTimeFormat, 'AbstractDateTimeFormat');
|
|
358
358
|
initMetadataForClass(DateTimeComponentsFormat, 'DateTimeComponentsFormat', VOID, AbstractDateTimeFormat);
|
|
359
359
|
initMetadataForClass(TwoDigitNumber, 'TwoDigitNumber');
|
|
@@ -93,8 +93,8 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
93
93
|
initMetadataForInterface(Entry, 'Entry');
|
|
94
94
|
initMetadataForInterface(KtMap, 'Map');
|
|
95
95
|
initMetadataForInterface(MutableIterable, 'MutableIterable');
|
|
96
|
-
initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList,
|
|
97
|
-
initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet,
|
|
96
|
+
initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, MutableIterable, Collection]);
|
|
97
|
+
initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, MutableIterable, Collection]);
|
|
98
98
|
initMetadataForInterface(KtMutableMap, 'MutableMap', VOID, VOID, [KtMap]);
|
|
99
99
|
initMetadataForCompanion(Companion_0);
|
|
100
100
|
initMetadataForClass(Enum, 'Enum', VOID, VOID, [Comparable]);
|
|
@@ -113,7 +113,7 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
113
113
|
initMetadataForInterface(Comparator, 'Comparator');
|
|
114
114
|
initMetadataForObject(Unit, 'Unit');
|
|
115
115
|
initMetadataForClass(AbstractCollection, 'AbstractCollection', VOID, VOID, [Collection]);
|
|
116
|
-
initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [AbstractCollection,
|
|
116
|
+
initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [AbstractCollection, MutableIterable, Collection]);
|
|
117
117
|
initMetadataForClass(IteratorImpl, 'IteratorImpl');
|
|
118
118
|
initMetadataForClass(ListIteratorImpl, 'ListIteratorImpl', VOID, IteratorImpl);
|
|
119
119
|
initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [AbstractMutableCollection, KtMutableList]);
|
|
@@ -126,7 +126,7 @@ if (typeof String.prototype.startsWith === 'undefined') {
|
|
|
126
126
|
initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [AbstractMutableList, KtMutableList, RandomAccess]);
|
|
127
127
|
initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [AbstractMutableMap, KtMutableMap]);
|
|
128
128
|
initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]);
|
|
129
|
-
initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [
|
|
129
|
+
initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [MutableIterable, Collection, AbstractMutableCollection]);
|
|
130
130
|
initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]);
|
|
131
131
|
initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase);
|
|
132
132
|
initMetadataForClass(HashMapKeysDefault$iterator$1);
|