danger-compose_compiler_metrics 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,220 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "./lib/compose_compiler_metrics/metrics"
4
+ require "tempfile"
5
+
6
+ describe Metrics do
7
+ let(:metrics) { described_class.new(hash) }
8
+
9
+ let(:hash) do
10
+ {
11
+ "skippableComposables" => 5,
12
+ "unskippableComposables" => 3,
13
+ "restartableComposables" => 8,
14
+ "unrestartableComposables" => 0,
15
+ "readonlyComposables" => 0,
16
+ "totalComposables" => 8,
17
+ "restartGroups" => 8,
18
+ "totalGroups" => 11,
19
+ "staticArguments" => 5,
20
+ "certainArguments" => 5,
21
+ "knownStableArguments" => 50,
22
+ "knownUnstableArguments" => 2,
23
+ "unknownStableArguments" => 0,
24
+ "totalArguments" => 52,
25
+ "markedStableClasses" => 0,
26
+ "inferredStableClasses" => 1,
27
+ "inferredUnstableClasses" => 1,
28
+ "inferredUncertainClasses" => 0,
29
+ "effectivelyStableClasses" => 1,
30
+ "totalClasses" => 2,
31
+ "memoizedLambdas" => 4,
32
+ "singletonLambdas" => 0,
33
+ "singletonComposableLambdas" => 3,
34
+ "composableLambdas" => 3,
35
+ "totalLambdas" => 5
36
+ }
37
+ end
38
+
39
+ describe "#keys" do
40
+ subject { metrics.keys }
41
+
42
+ it do
43
+ is_expected.to eq %w(
44
+ skippableComposables
45
+ unskippableComposables
46
+ restartableComposables
47
+ unrestartableComposables
48
+ readonlyComposables
49
+ totalComposables
50
+ restartGroups
51
+ totalGroups
52
+ staticArguments
53
+ certainArguments
54
+ knownStableArguments
55
+ knownUnstableArguments
56
+ unknownStableArguments
57
+ totalArguments
58
+ markedStableClasses
59
+ inferredStableClasses
60
+ inferredUnstableClasses
61
+ inferredUncertainClasses
62
+ effectivelyStableClasses
63
+ totalClasses
64
+ memoizedLambdas
65
+ singletonLambdas
66
+ singletonComposableLambdas
67
+ composableLambdas
68
+ totalLambdas
69
+ )
70
+ end
71
+ end
72
+
73
+ describe "#grouping_keys" do
74
+ subject { metrics.grouping_keys }
75
+
76
+ it { is_expected.to eq %w(Composables Groups Arguments Classes Lambdas) }
77
+ end
78
+
79
+ describe "#grouped_metrics" do
80
+ subject { metrics.grouped_metrics }
81
+
82
+ it do
83
+ is_expected.to eq(
84
+ "Composables" => described_class.new(
85
+ "skippableComposables" => 5,
86
+ "unskippableComposables" => 3,
87
+ "restartableComposables" => 8,
88
+ "unrestartableComposables" => 0,
89
+ "readonlyComposables" => 0,
90
+ "totalComposables" => 8
91
+ ),
92
+ "Groups" => described_class.new(
93
+ "restartGroups" => 8,
94
+ "totalGroups" => 11
95
+ ),
96
+ "Arguments" => described_class.new(
97
+ "staticArguments" => 5,
98
+ "certainArguments" => 5,
99
+ "knownStableArguments" => 50,
100
+ "knownUnstableArguments" => 2,
101
+ "unknownStableArguments" => 0,
102
+ "totalArguments" => 52
103
+ ),
104
+ "Classes" => described_class.new(
105
+ "markedStableClasses" => 0,
106
+ "inferredStableClasses" => 1,
107
+ "inferredUnstableClasses" => 1,
108
+ "inferredUncertainClasses" => 0,
109
+ "effectivelyStableClasses" => 1,
110
+ "totalClasses" => 2
111
+ ),
112
+ "Lambdas" => described_class.new(
113
+ "memoizedLambdas" => 4,
114
+ "singletonLambdas" => 0,
115
+ "singletonComposableLambdas" => 3,
116
+ "composableLambdas" => 3,
117
+ "totalLambdas" => 5
118
+ )
119
+ )
120
+ end
121
+ end
122
+
123
+ describe "#skippable_composables" do
124
+ subject { metrics.skippable_composables }
125
+
126
+ it { is_expected.to eq 5 }
127
+ end
128
+
129
+ describe "#unskippable_composables" do
130
+ subject { metrics.unskippable_composables }
131
+
132
+ it { is_expected.to eq 3 }
133
+ end
134
+
135
+ describe "#total_composables" do
136
+ subject { metrics.total_composables }
137
+
138
+ it { is_expected.to eq 8 }
139
+ end
140
+
141
+ describe "#to_h" do
142
+ subject { metrics.to_h }
143
+
144
+ it { is_expected.to eq metrics.hash }
145
+ end
146
+ end
147
+
148
+ describe Metrics::Loader do
149
+ let(:loader) { described_class.new(json_file.path) }
150
+
151
+ let(:json_file) do
152
+ Tempfile.create(["compose_compiler_metrics_", ".json"]).tap do |file|
153
+ file.write(json)
154
+ file.flush
155
+ end
156
+ end
157
+
158
+ let(:json) do
159
+ {
160
+ "skippableComposables" => 5,
161
+ "restartableComposables" => 8,
162
+ "readonlyComposables" => 0,
163
+ "totalComposables" => 8,
164
+ "restartGroups" => 8,
165
+ "totalGroups" => 11,
166
+ "staticArguments" => 5,
167
+ "certainArguments" => 5,
168
+ "knownStableArguments" => 50,
169
+ "knownUnstableArguments" => 2,
170
+ "unknownStableArguments" => 0,
171
+ "totalArguments" => 52,
172
+ "markedStableClasses" => 0,
173
+ "inferredStableClasses" => 1,
174
+ "inferredUnstableClasses" => 1,
175
+ "inferredUncertainClasses" => 0,
176
+ "effectivelyStableClasses" => 1,
177
+ "totalClasses" => 2,
178
+ "memoizedLambdas" => 4,
179
+ "singletonLambdas" => 0,
180
+ "singletonComposableLambdas" => 3,
181
+ "composableLambdas" => 3,
182
+ "totalLambdas" => 5
183
+ }.to_json
184
+ end
185
+
186
+ describe "#load" do
187
+ subject { loader.load }
188
+
189
+ it do
190
+ is_expected.to have_attributes(
191
+ skippable_composables: 5,
192
+ restartable_composables: 8,
193
+ readonly_composables: 0,
194
+ total_composables: 8,
195
+ restart_groups: 8,
196
+ total_groups: 11,
197
+ static_arguments: 5,
198
+ certain_arguments: 5,
199
+ known_stable_arguments: 50,
200
+ known_unstable_arguments: 2,
201
+ unknown_stable_arguments: 0,
202
+ total_arguments: 52,
203
+ marked_stable_classes: 0,
204
+ inferred_stable_classes: 1,
205
+ inferred_unstable_classes: 1,
206
+ inferred_uncertain_classes: 0,
207
+ effectively_stable_classes: 1,
208
+ total_classes: 2,
209
+ memoized_lambdas: 4,
210
+ singleton_lambdas: 0,
211
+ singleton_composable_lambdas: 3,
212
+ composable_lambdas: 3,
213
+ total_lambdas: 5
214
+ )
215
+ end
216
+
217
+ it { is_expected.to have_attributes(unskippableComposables: 3) }
218
+ it { is_expected.to have_attributes(unrestartableComposables: 0) }
219
+ end
220
+ end
data/spec/spec_helper.rb CHANGED
@@ -17,11 +17,18 @@ if `git remote -v` == ""
17
17
  exit(0)
18
18
  end
19
19
 
20
+ module WithinBlockIsExpected
21
+ def within_block_is_expected
22
+ expect { subject }
23
+ end
24
+ end
25
+
20
26
  # Use coloured output, it's the best.
21
27
  RSpec.configure do |config|
22
28
  config.filter_gems_from_backtrace "bundler"
23
29
  config.color = true
24
30
  config.tty = true
31
+ config.include WithinBlockIsExpected
25
32
  end
26
33
 
27
34
  require "danger_plugin"
@@ -0,0 +1,8 @@
1
+ stable class MainActivity {
2
+ <runtime stability> = Stable
3
+ }
4
+ stable class Contact {
5
+ stable val name: String
6
+ stable val number: String
7
+ <runtime stability> = Stable
8
+ }
@@ -0,0 +1,4 @@
1
+ package,name,composable,skippable,restartable,readonly,inline,isLambda,hasDefaults,defaultsGroup,groups,calls,
2
+ com.example.android.ContactRow,ContactRow,1,1,1,0,0,0,0,0,1,2,
3
+ com.example.android.ToggleButton,ToggleButton,1,1,1,0,0,0,0,0,1,1,
4
+ com.example.android.ContactDetails,ContactDetails,1,1,1,0,0,0,0,0,1,1,
@@ -0,0 +1,11 @@
1
+ restartable skippable scheme("[androidx.compose.ui.UiComposable]") fun ContactRow(
2
+ stable contact: Contact
3
+ stable modifier: Modifier? = @static Companion
4
+ )
5
+ restartable skippable scheme("[androidx.compose.ui.UiComposable]") fun ToggleButton(
6
+ stable selected: Boolean
7
+ stable onToggled: Function1<Boolean, Unit>
8
+ )
9
+ restartable skippable scheme("[androidx.compose.ui.UiComposable]") fun ContactDetails(
10
+ stable contact: Contact
11
+ )
@@ -0,0 +1,25 @@
1
+ {
2
+ "skippableComposables": 6,
3
+ "restartableComposables": 7,
4
+ "readonlyComposables": 0,
5
+ "totalComposables": 7,
6
+ "restartGroups": 7,
7
+ "totalGroups": 7,
8
+ "staticArguments": 4,
9
+ "certainArguments": 4,
10
+ "knownStableArguments": 47,
11
+ "knownUnstableArguments": 0,
12
+ "unknownStableArguments": 0,
13
+ "totalArguments": 47,
14
+ "markedStableClasses": 0,
15
+ "inferredStableClasses": 2,
16
+ "inferredUnstableClasses": 0,
17
+ "inferredUncertainClasses": 0,
18
+ "effectivelyStableClasses": 2,
19
+ "totalClasses": 2,
20
+ "memoizedLambdas": 4,
21
+ "singletonLambdas": 0,
22
+ "singletonComposableLambdas": 3,
23
+ "composableLambdas": 3,
24
+ "totalLambdas": 4
25
+ }
@@ -0,0 +1,8 @@
1
+ stable class MainActivity {
2
+ <runtime stability> = Stable
3
+ }
4
+ unstable class Contact {
5
+ stable var name: String
6
+ stable val number: String
7
+ <runtime stability> = Unstable
8
+ }
@@ -0,0 +1,5 @@
1
+ package,name,composable,skippable,restartable,readonly,inline,isLambda,hasDefaults,defaultsGroup,groups,calls,
2
+ com.example.android.ContactRow,ContactRow,1,0,1,0,0,0,0,0,1,2,
3
+ com.example.android.ToggleButton,ToggleButton,1,1,1,0,0,0,0,0,1,1,
4
+ com.example.android.ContactDetails,ContactDetails,1,0,1,0,0,0,0,0,1,1,
5
+ com.example.android.ui.theme.ExampleTheme,ExampleTheme,1,1,1,0,0,0,1,0,4,5,
@@ -0,0 +1,16 @@
1
+ restartable scheme("[androidx.compose.ui.UiComposable]") fun ContactRow(
2
+ unstable contact: Contact
3
+ stable modifier: Modifier? = @static Companion
4
+ )
5
+ restartable skippable scheme("[androidx.compose.ui.UiComposable]") fun ToggleButton(
6
+ stable selected: Boolean
7
+ stable onToggled: Function1<Boolean, Unit>
8
+ )
9
+ restartable scheme("[androidx.compose.ui.UiComposable]") fun ContactDetails(
10
+ unstable contact: Contact
11
+ )
12
+ restartable skippable scheme("[0, [0]]") fun ExampleTheme(
13
+ stable darkTheme: Boolean = @dynamic isSystemInDarkTheme($composer, 0)
14
+ stable dynamicColor: Boolean = @static true
15
+ stable content: Function2<Composer, Int, Unit>
16
+ )
@@ -0,0 +1,25 @@
1
+ {
2
+ "skippableComposables": 5,
3
+ "restartableComposables": 8,
4
+ "readonlyComposables": 0,
5
+ "totalComposables": 8,
6
+ "restartGroups": 8,
7
+ "totalGroups": 11,
8
+ "staticArguments": 5,
9
+ "certainArguments": 5,
10
+ "knownStableArguments": 50,
11
+ "knownUnstableArguments": 2,
12
+ "unknownStableArguments": 0,
13
+ "totalArguments": 52,
14
+ "markedStableClasses": 0,
15
+ "inferredStableClasses": 1,
16
+ "inferredUnstableClasses": 1,
17
+ "inferredUncertainClasses": 0,
18
+ "effectivelyStableClasses": 1,
19
+ "totalClasses": 2,
20
+ "memoizedLambdas": 4,
21
+ "singletonLambdas": 0,
22
+ "singletonComposableLambdas": 3,
23
+ "composableLambdas": 3,
24
+ "totalLambdas": 5
25
+ }
@@ -0,0 +1,278 @@
1
+ {
2
+ "url": "https://api.github.com/repos/danger/danger-plugin-template/pulls/18",
3
+ "id": 185317229,
4
+ "node_id": "MDExOlB1bGxSZXF1ZXN0MTg1MzE3MjI5",
5
+ "html_url": "https://github.com/danger/danger-plugin-template/pull/18",
6
+ "diff_url": "https://github.com/danger/danger-plugin-template/pull/18.diff",
7
+ "patch_url": "https://github.com/danger/danger-plugin-template/pull/18.patch",
8
+ "issue_url": "https://api.github.com/repos/danger/danger-plugin-template/issues/18",
9
+ "number": 18,
10
+ "state": "closed",
11
+ "locked": false,
12
+ "title": "add exmaple of how to mock PRs",
13
+ "user": {
14
+ "login": "wilrnh",
15
+ "id": 555966,
16
+ "node_id": "MDQ6VXNlcjU1NTk2Ng==",
17
+ "avatar_url": "https://avatars.githubusercontent.com/u/555966?v=4",
18
+ "gravatar_id": "",
19
+ "url": "https://api.github.com/users/wilrnh",
20
+ "html_url": "https://github.com/wilrnh",
21
+ "followers_url": "https://api.github.com/users/wilrnh/followers",
22
+ "following_url": "https://api.github.com/users/wilrnh/following{/other_user}",
23
+ "gists_url": "https://api.github.com/users/wilrnh/gists{/gist_id}",
24
+ "starred_url": "https://api.github.com/users/wilrnh/starred{/owner}{/repo}",
25
+ "subscriptions_url": "https://api.github.com/users/wilrnh/subscriptions",
26
+ "organizations_url": "https://api.github.com/users/wilrnh/orgs",
27
+ "repos_url": "https://api.github.com/users/wilrnh/repos",
28
+ "events_url": "https://api.github.com/users/wilrnh/events{/privacy}",
29
+ "received_events_url": "https://api.github.com/users/wilrnh/received_events",
30
+ "type": "User",
31
+ "site_admin": false
32
+ },
33
+ "body": "Fixes danger/danger#661\r\n\r\nadd example how to mock PRs",
34
+ "created_at": "2018-05-02T01:52:26Z",
35
+ "updated_at": "2018-05-02T10:37:04Z",
36
+ "closed_at": "2018-05-02T10:37:04Z",
37
+ "merged_at": "2018-05-02T10:37:04Z",
38
+ "merge_commit_sha": "39eacac22d52a2b70fc49bd8aba19eb7d2864717",
39
+ "assignee": null,
40
+ "assignees": [
41
+
42
+ ],
43
+ "requested_reviewers": [
44
+
45
+ ],
46
+ "requested_teams": [
47
+
48
+ ],
49
+ "labels": [
50
+
51
+ ],
52
+ "milestone": null,
53
+ "draft": false,
54
+ "commits_url": "https://api.github.com/repos/danger/danger-plugin-template/pulls/18/commits",
55
+ "review_comments_url": "https://api.github.com/repos/danger/danger-plugin-template/pulls/18/comments",
56
+ "review_comment_url": "https://api.github.com/repos/danger/danger-plugin-template/pulls/comments{/number}",
57
+ "comments_url": "https://api.github.com/repos/danger/danger-plugin-template/issues/18/comments",
58
+ "statuses_url": "https://api.github.com/repos/danger/danger-plugin-template/statuses/abe89bee0cdc5f45b1dee62c60e74c70f3fcb5d5",
59
+ "head": {
60
+ "label": "wilrnh:661-mocking-prs",
61
+ "ref": "661-mocking-prs",
62
+ "sha": "abe89bee0cdc5f45b1dee62c60e74c70f3fcb5d5",
63
+ "user": {
64
+ "login": "wilrnh",
65
+ "id": 555966,
66
+ "node_id": "MDQ6VXNlcjU1NTk2Ng==",
67
+ "avatar_url": "https://avatars.githubusercontent.com/u/555966?v=4",
68
+ "gravatar_id": "",
69
+ "url": "https://api.github.com/users/wilrnh",
70
+ "html_url": "https://github.com/wilrnh",
71
+ "followers_url": "https://api.github.com/users/wilrnh/followers",
72
+ "following_url": "https://api.github.com/users/wilrnh/following{/other_user}",
73
+ "gists_url": "https://api.github.com/users/wilrnh/gists{/gist_id}",
74
+ "starred_url": "https://api.github.com/users/wilrnh/starred{/owner}{/repo}",
75
+ "subscriptions_url": "https://api.github.com/users/wilrnh/subscriptions",
76
+ "organizations_url": "https://api.github.com/users/wilrnh/orgs",
77
+ "repos_url": "https://api.github.com/users/wilrnh/repos",
78
+ "events_url": "https://api.github.com/users/wilrnh/events{/privacy}",
79
+ "received_events_url": "https://api.github.com/users/wilrnh/received_events",
80
+ "type": "User",
81
+ "site_admin": false
82
+ },
83
+ "repo": null
84
+ },
85
+ "base": {
86
+ "label": "danger:master",
87
+ "ref": "master",
88
+ "sha": "30bd69c1c09d927abde0695fcb39dd70d4cc0f81",
89
+ "user": {
90
+ "login": "danger",
91
+ "id": 17147106,
92
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjE3MTQ3MTA2",
93
+ "avatar_url": "https://avatars.githubusercontent.com/u/17147106?v=4",
94
+ "gravatar_id": "",
95
+ "url": "https://api.github.com/users/danger",
96
+ "html_url": "https://github.com/danger",
97
+ "followers_url": "https://api.github.com/users/danger/followers",
98
+ "following_url": "https://api.github.com/users/danger/following{/other_user}",
99
+ "gists_url": "https://api.github.com/users/danger/gists{/gist_id}",
100
+ "starred_url": "https://api.github.com/users/danger/starred{/owner}{/repo}",
101
+ "subscriptions_url": "https://api.github.com/users/danger/subscriptions",
102
+ "organizations_url": "https://api.github.com/users/danger/orgs",
103
+ "repos_url": "https://api.github.com/users/danger/repos",
104
+ "events_url": "https://api.github.com/users/danger/events{/privacy}",
105
+ "received_events_url": "https://api.github.com/users/danger/received_events",
106
+ "type": "Organization",
107
+ "site_admin": false
108
+ },
109
+ "repo": {
110
+ "id": 60424063,
111
+ "node_id": "MDEwOlJlcG9zaXRvcnk2MDQyNDA2Mw==",
112
+ "name": "danger-plugin-template",
113
+ "full_name": "danger/danger-plugin-template",
114
+ "private": false,
115
+ "owner": {
116
+ "login": "danger",
117
+ "id": 17147106,
118
+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjE3MTQ3MTA2",
119
+ "avatar_url": "https://avatars.githubusercontent.com/u/17147106?v=4",
120
+ "gravatar_id": "",
121
+ "url": "https://api.github.com/users/danger",
122
+ "html_url": "https://github.com/danger",
123
+ "followers_url": "https://api.github.com/users/danger/followers",
124
+ "following_url": "https://api.github.com/users/danger/following{/other_user}",
125
+ "gists_url": "https://api.github.com/users/danger/gists{/gist_id}",
126
+ "starred_url": "https://api.github.com/users/danger/starred{/owner}{/repo}",
127
+ "subscriptions_url": "https://api.github.com/users/danger/subscriptions",
128
+ "organizations_url": "https://api.github.com/users/danger/orgs",
129
+ "repos_url": "https://api.github.com/users/danger/repos",
130
+ "events_url": "https://api.github.com/users/danger/events{/privacy}",
131
+ "received_events_url": "https://api.github.com/users/danger/received_events",
132
+ "type": "Organization",
133
+ "site_admin": false
134
+ },
135
+ "html_url": "https://github.com/danger/danger-plugin-template",
136
+ "description": "An opinionated template for creating a Danger plugin",
137
+ "fork": false,
138
+ "url": "https://api.github.com/repos/danger/danger-plugin-template",
139
+ "forks_url": "https://api.github.com/repos/danger/danger-plugin-template/forks",
140
+ "keys_url": "https://api.github.com/repos/danger/danger-plugin-template/keys{/key_id}",
141
+ "collaborators_url": "https://api.github.com/repos/danger/danger-plugin-template/collaborators{/collaborator}",
142
+ "teams_url": "https://api.github.com/repos/danger/danger-plugin-template/teams",
143
+ "hooks_url": "https://api.github.com/repos/danger/danger-plugin-template/hooks",
144
+ "issue_events_url": "https://api.github.com/repos/danger/danger-plugin-template/issues/events{/number}",
145
+ "events_url": "https://api.github.com/repos/danger/danger-plugin-template/events",
146
+ "assignees_url": "https://api.github.com/repos/danger/danger-plugin-template/assignees{/user}",
147
+ "branches_url": "https://api.github.com/repos/danger/danger-plugin-template/branches{/branch}",
148
+ "tags_url": "https://api.github.com/repos/danger/danger-plugin-template/tags",
149
+ "blobs_url": "https://api.github.com/repos/danger/danger-plugin-template/git/blobs{/sha}",
150
+ "git_tags_url": "https://api.github.com/repos/danger/danger-plugin-template/git/tags{/sha}",
151
+ "git_refs_url": "https://api.github.com/repos/danger/danger-plugin-template/git/refs{/sha}",
152
+ "trees_url": "https://api.github.com/repos/danger/danger-plugin-template/git/trees{/sha}",
153
+ "statuses_url": "https://api.github.com/repos/danger/danger-plugin-template/statuses/{sha}",
154
+ "languages_url": "https://api.github.com/repos/danger/danger-plugin-template/languages",
155
+ "stargazers_url": "https://api.github.com/repos/danger/danger-plugin-template/stargazers",
156
+ "contributors_url": "https://api.github.com/repos/danger/danger-plugin-template/contributors",
157
+ "subscribers_url": "https://api.github.com/repos/danger/danger-plugin-template/subscribers",
158
+ "subscription_url": "https://api.github.com/repos/danger/danger-plugin-template/subscription",
159
+ "commits_url": "https://api.github.com/repos/danger/danger-plugin-template/commits{/sha}",
160
+ "git_commits_url": "https://api.github.com/repos/danger/danger-plugin-template/git/commits{/sha}",
161
+ "comments_url": "https://api.github.com/repos/danger/danger-plugin-template/comments{/number}",
162
+ "issue_comment_url": "https://api.github.com/repos/danger/danger-plugin-template/issues/comments{/number}",
163
+ "contents_url": "https://api.github.com/repos/danger/danger-plugin-template/contents/{+path}",
164
+ "compare_url": "https://api.github.com/repos/danger/danger-plugin-template/compare/{base}...{head}",
165
+ "merges_url": "https://api.github.com/repos/danger/danger-plugin-template/merges",
166
+ "archive_url": "https://api.github.com/repos/danger/danger-plugin-template/{archive_format}{/ref}",
167
+ "downloads_url": "https://api.github.com/repos/danger/danger-plugin-template/downloads",
168
+ "issues_url": "https://api.github.com/repos/danger/danger-plugin-template/issues{/number}",
169
+ "pulls_url": "https://api.github.com/repos/danger/danger-plugin-template/pulls{/number}",
170
+ "milestones_url": "https://api.github.com/repos/danger/danger-plugin-template/milestones{/number}",
171
+ "notifications_url": "https://api.github.com/repos/danger/danger-plugin-template/notifications{?since,all,participating}",
172
+ "labels_url": "https://api.github.com/repos/danger/danger-plugin-template/labels{/name}",
173
+ "releases_url": "https://api.github.com/repos/danger/danger-plugin-template/releases{/id}",
174
+ "deployments_url": "https://api.github.com/repos/danger/danger-plugin-template/deployments",
175
+ "created_at": "2016-06-04T18:17:02Z",
176
+ "updated_at": "2023-12-07T01:29:39Z",
177
+ "pushed_at": "2022-09-04T13:16:52Z",
178
+ "git_url": "git://github.com/danger/danger-plugin-template.git",
179
+ "ssh_url": "git@github.com:danger/danger-plugin-template.git",
180
+ "clone_url": "https://github.com/danger/danger-plugin-template.git",
181
+ "svn_url": "https://github.com/danger/danger-plugin-template",
182
+ "homepage": null,
183
+ "size": 42,
184
+ "stargazers_count": 20,
185
+ "watchers_count": 20,
186
+ "language": "Ruby",
187
+ "has_issues": true,
188
+ "has_projects": true,
189
+ "has_downloads": true,
190
+ "has_wiki": true,
191
+ "has_pages": false,
192
+ "has_discussions": false,
193
+ "forks_count": 13,
194
+ "mirror_url": null,
195
+ "archived": false,
196
+ "disabled": false,
197
+ "open_issues_count": 2,
198
+ "license": {
199
+ "key": "other",
200
+ "name": "Other",
201
+ "spdx_id": "NOASSERTION",
202
+ "url": null,
203
+ "node_id": "MDc6TGljZW5zZTA="
204
+ },
205
+ "allow_forking": true,
206
+ "is_template": false,
207
+ "web_commit_signoff_required": false,
208
+ "topics": [
209
+
210
+ ],
211
+ "visibility": "public",
212
+ "forks": 13,
213
+ "open_issues": 2,
214
+ "watchers": 20,
215
+ "default_branch": "master"
216
+ }
217
+ },
218
+ "_links": {
219
+ "self": {
220
+ "href": "https://api.github.com/repos/danger/danger-plugin-template/pulls/18"
221
+ },
222
+ "html": {
223
+ "href": "https://github.com/danger/danger-plugin-template/pull/18"
224
+ },
225
+ "issue": {
226
+ "href": "https://api.github.com/repos/danger/danger-plugin-template/issues/18"
227
+ },
228
+ "comments": {
229
+ "href": "https://api.github.com/repos/danger/danger-plugin-template/issues/18/comments"
230
+ },
231
+ "review_comments": {
232
+ "href": "https://api.github.com/repos/danger/danger-plugin-template/pulls/18/comments"
233
+ },
234
+ "review_comment": {
235
+ "href": "https://api.github.com/repos/danger/danger-plugin-template/pulls/comments{/number}"
236
+ },
237
+ "commits": {
238
+ "href": "https://api.github.com/repos/danger/danger-plugin-template/pulls/18/commits"
239
+ },
240
+ "statuses": {
241
+ "href": "https://api.github.com/repos/danger/danger-plugin-template/statuses/abe89bee0cdc5f45b1dee62c60e74c70f3fcb5d5"
242
+ }
243
+ },
244
+ "author_association": "CONTRIBUTOR",
245
+ "auto_merge": null,
246
+ "active_lock_reason": null,
247
+ "merged": true,
248
+ "mergeable": null,
249
+ "rebaseable": null,
250
+ "mergeable_state": "unknown",
251
+ "merged_by": {
252
+ "login": "orta",
253
+ "id": 49038,
254
+ "node_id": "MDQ6VXNlcjQ5MDM4",
255
+ "avatar_url": "https://avatars.githubusercontent.com/u/49038?v=4",
256
+ "gravatar_id": "",
257
+ "url": "https://api.github.com/users/orta",
258
+ "html_url": "https://github.com/orta",
259
+ "followers_url": "https://api.github.com/users/orta/followers",
260
+ "following_url": "https://api.github.com/users/orta/following{/other_user}",
261
+ "gists_url": "https://api.github.com/users/orta/gists{/gist_id}",
262
+ "starred_url": "https://api.github.com/users/orta/starred{/owner}{/repo}",
263
+ "subscriptions_url": "https://api.github.com/users/orta/subscriptions",
264
+ "organizations_url": "https://api.github.com/users/orta/orgs",
265
+ "repos_url": "https://api.github.com/users/orta/repos",
266
+ "events_url": "https://api.github.com/users/orta/events{/privacy}",
267
+ "received_events_url": "https://api.github.com/users/orta/received_events",
268
+ "type": "User",
269
+ "site_admin": false
270
+ },
271
+ "comments": 2,
272
+ "review_comments": 0,
273
+ "maintainer_can_modify": false,
274
+ "commits": 2,
275
+ "additions": 5,
276
+ "deletions": 0,
277
+ "changed_files": 1
278
+ }