@gitkraken/provider-apis 0.25.4 → 0.25.5

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,111 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.5
4
+
5
+ - sort issues by updated date (Jira, Jira Server)
6
+ - add new launchpad bucketing functions
7
+
8
+ 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:
9
+
10
+ ```ts
11
+ const prs = [{
12
+ title: 'Pull Request 1',
13
+ repository: {
14
+ id: 'repo-id-1',
15
+ name: 'gitkraken-client',
16
+ owner: {
17
+ login: 'gitkraken',
18
+ },
19
+ ...
20
+ },
21
+ ...
22
+ }, {
23
+ title: 'Pull Request 2',
24
+ repository: {
25
+ id: 'repo-id-1',
26
+ name: 'gitkraken-client',
27
+ owner: {
28
+ login: 'gitkraken',
29
+ },
30
+ ...
31
+ },
32
+ ...
33
+ }, {
34
+ title: 'Pull Request 3',
35
+ repository: {
36
+ id: 'repo-id-2',
37
+ name: 'gitkraken.dev',
38
+ owner: {
39
+ login: 'gitkraken',
40
+ },
41
+ ...
42
+ },
43
+ ...
44
+ }, {
45
+ title: 'Pull Request 4',
46
+ repository: {
47
+ id: 'repo-id-3',
48
+ name: 'provider-apis-package-js',
49
+ owner: {
50
+ login: 'gitkraken',
51
+ },
52
+ ...
53
+ },
54
+ ...
55
+ }];
56
+
57
+ const buckets = groupPullRequestsByRepo(prs);
58
+
59
+ buckets === {
60
+ 'repo-id-1': {
61
+ id: 'repo-id-1',
62
+ name: 'gitkraken-client',
63
+ priority: 0,
64
+ pullRequests: [{
65
+ title: 'Pull Request 1',
66
+ ...
67
+ }, {
68
+ title: 'Pull Request 2',
69
+ ...
70
+ }],
71
+ },
72
+ 'repo-id-2': {
73
+ id: 'repo-id-2',
74
+ name: 'gitkraken.dev',
75
+ priority: 1,
76
+ pullRequests: [{
77
+ title: 'Pull Request 3',
78
+ ...
79
+ }],
80
+ },
81
+ 'repo-id-3': {
82
+ id: 'repo-id-3',
83
+ name: 'provider-apis-package-js',
84
+ priority: 2,
85
+ pullRequests: [{
86
+ title: 'Pull Request 4',
87
+ ...
88
+ }],
89
+ }
90
+ }
91
+ ```
92
+
93
+ Bucket priority is assigned based on the alphabetical order of the bucket names.
94
+
95
+ The following PR bucketing functions have been added:
96
+ - groupPullRequestsByRepo
97
+ - groupPullRequestsByAssignee
98
+ - groupPullRequestsByAuthor
99
+ - groupPullRequestsByReviewer
100
+ - groupPullRequestsByWorkspace
101
+ - groupPullRequestsByGitKrakenTeam
102
+
103
+ The following issue bucketing functions have been added:
104
+ - groupIssuesByRepo
105
+ - groupIssuesByAssignee
106
+ - groupIssuesByAuthor
107
+ - groupIssuesByGitKrakenTeam
108
+
3
109
  ## 0.25.4
4
110
 
5
111
  - fix issue where the `httpsUrl` property for repositories sometimes would not be set (BitBucket Server)
@@ -157,7 +263,7 @@ const issues = await jira.getIssuesForProject({
157
263
 
158
264
  ## 0.22.2
159
265
 
160
- - fixed `resourceId` being required for Jira Server entity IDs
266
+ - fixed`resourceId` being required for Jira Server entity IDs
161
267
 
162
268
  ## 0.22.1
163
269