@gitkraken/provider-apis 0.25.4 → 0.25.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,119 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.6
4
+
5
+ - added icon strings to some new Launchpad buckets
6
+ - updated types of Launchpad bucket types
7
+
8
+ ## 0.25.5
9
+
10
+ - increase max issues per page from 10 to 100 (Jira, Jira Server)
11
+ - sort issues by updated date (Jira, Jira Server)
12
+ - add new launchpad bucketing functions
13
+
14
+ The new Launchpad bucketing functions take a list of pull requests or issues and group them based on the type of bucketing function being used. For instance, the `groupPullRequestsByRepo` function will group pull requests with the same repo into the same bucket:
15
+
16
+ ```ts
17
+ const prs = [{
18
+ title: 'Pull Request 1',
19
+ repository: {
20
+ id: 'repo-id-1',
21
+ name: 'gitkraken-client',
22
+ owner: {
23
+ login: 'gitkraken',
24
+ },
25
+ ...
26
+ },
27
+ ...
28
+ }, {
29
+ title: 'Pull Request 2',
30
+ repository: {
31
+ id: 'repo-id-1',
32
+ name: 'gitkraken-client',
33
+ owner: {
34
+ login: 'gitkraken',
35
+ },
36
+ ...
37
+ },
38
+ ...
39
+ }, {
40
+ title: 'Pull Request 3',
41
+ repository: {
42
+ id: 'repo-id-2',
43
+ name: 'gitkraken.dev',
44
+ owner: {
45
+ login: 'gitkraken',
46
+ },
47
+ ...
48
+ },
49
+ ...
50
+ }, {
51
+ title: 'Pull Request 4',
52
+ repository: {
53
+ id: 'repo-id-3',
54
+ name: 'provider-apis-package-js',
55
+ owner: {
56
+ login: 'gitkraken',
57
+ },
58
+ ...
59
+ },
60
+ ...
61
+ }];
62
+
63
+ const buckets = groupPullRequestsByRepo(prs);
64
+
65
+ buckets === {
66
+ 'repo-id-1': {
67
+ id: 'repo-id-1',
68
+ name: 'gitkraken-client',
69
+ priority: 0,
70
+ pullRequests: [{
71
+ title: 'Pull Request 1',
72
+ ...
73
+ }, {
74
+ title: 'Pull Request 2',
75
+ ...
76
+ }],
77
+ },
78
+ 'repo-id-2': {
79
+ id: 'repo-id-2',
80
+ name: 'gitkraken.dev',
81
+ priority: 1,
82
+ pullRequests: [{
83
+ title: 'Pull Request 3',
84
+ ...
85
+ }],
86
+ },
87
+ 'repo-id-3': {
88
+ id: 'repo-id-3',
89
+ name: 'provider-apis-package-js',
90
+ priority: 2,
91
+ pullRequests: [{
92
+ title: 'Pull Request 4',
93
+ ...
94
+ }],
95
+ }
96
+ }
97
+ ```
98
+
99
+ Bucket priority is assigned based on the alphabetical order of the bucket names.
100
+
101
+ The following PR bucketing functions have been added:
102
+
103
+ - groupPullRequestsByRepo
104
+ - groupPullRequestsByAssignee
105
+ - groupPullRequestsByAuthor
106
+ - groupPullRequestsByReviewer
107
+ - groupPullRequestsByWorkspace
108
+ - groupPullRequestsByGitKrakenTeam
109
+
110
+ The following issue bucketing functions have been added:
111
+
112
+ - groupIssuesByRepo
113
+ - groupIssuesByAssignee
114
+ - groupIssuesByAuthor
115
+ - groupIssuesByGitKrakenTeam
116
+
3
117
  ## 0.25.4
4
118
 
5
119
  - fix issue where the `httpsUrl` property for repositories sometimes would not be set (BitBucket Server)
@@ -32,6 +146,7 @@
32
146
  We refactored the `EntityIndentifier` types to be more precise. The old types would allow the creation of identifiers that didn't make any sense.
33
147
 
34
148
  For instance, using the old types, one could create a Bitbucket Server entity identifier that does not have a domain:
149
+
35
150
  ```ts
36
151
  const id: BitbucketPullRequestEntityIdentifierInput = {
37
152
  provider: EntityIdentifierProviderType.BitbucketServer,
@@ -39,7 +154,7 @@ const id: BitbucketPullRequestEntityIdentifierInput = {
39
154
  version: EntityVersion.One,
40
155
  repoId: 'test-repo',
41
156
  entityId: '1',
42
- domain: undefined
157
+ domain: undefined,
43
158
  };
44
159
  ```
45
160
 
@@ -157,7 +272,7 @@ const issues = await jira.getIssuesForProject({
157
272
 
158
273
  ## 0.22.2
159
274
 
160
- - fixed `resourceId` being required for Jira Server entity IDs
275
+ - fixed`resourceId` being required for Jira Server entity IDs
161
276
 
162
277
  ## 0.22.1
163
278