-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfacts.graphql
More file actions
218 lines (197 loc) · 4.21 KB
/
facts.graphql
File metadata and controls
218 lines (197 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# SPDX-FileCopyrightText: 2026 Emily <hello@emily.moe>
#
# SPDX-License-Identifier: MIT
fragment ActorInfo on Actor {
... on Node {
id
}
login
}
fragment RepositoryInfo on Repository {
id
owner {
...ActorInfo
}
name
}
fragment CommitSignatureInfo on Commit {
signature {
__typename
... on GpgSignature {
payload
signature
}
}
}
fragment PullRequestInfo on PullRequest {
id
number
state
author {
...ActorInfo
}
createdAt
updatedAt
baseRepository {
id
}
headRefName
headRefOid
headRepository {
...RepositoryInfo
}
commits(last: 1) {
nodes {
commit {
...CommitSignatureInfo
}
}
}
mergedBy {
...ActorInfo
}
mergeCommit {
oid
...CommitSignatureInfo
}
latestOpinionatedReviews(first: 15, writersOnly: true) {
nodes {
author {
...ActorInfo
}
commit {
oid
}
state
}
}
}
query BasicFacts($nixpkgsCIActorID: ID!, $githubActionsActorID: ID!) {
# These are the repositories that the @NixOS/nixpkgs-committers team
# had write access to during the risk period.
nixpkgsRepository: repository(owner: "NixOS", name: "nixpkgs") {
...RepositoryInfo
}
nixosHardwareRepository: repository(owner: "NixOS", name: "nixos-hardware") {
...RepositoryInfo
}
nixosWeeklyRepository: repository(owner: "NixOS", name: "nixos-weekly") {
...RepositoryInfo
}
nixIdeaRepository: repository(owner: "NixOS", name: "nix-idea") {
...RepositoryInfo
}
nixPillsRepository: repository(owner: "NixOS", name: "nix-pills") {
...RepositoryInfo
}
# These are the specific users relevant to the audit.
affectedUser: user(login: "Scrumplex") {
...ActorInfo
}
webFlowUser: user(login: "web-flow") {
...ActorInfo
}
rRyantmUser: user(login: "r-ryantm") {
...ActorInfo
}
# The GraphQL API has no way to query directly for a bot account, so
# we need to bounce these through the REST API. (The GraphQL API
# omits the `[bot]` suffix from the acocunt logins while the REST API
# requires it, so although this is redundant to the information
# returned by the REST API, it’s good to be consistent.)
nixpkgsCIActor: node(id: $nixpkgsCIActorID) {
__typename
...ActorInfo
}
githubActionsActor: node(id: $githubActionsActorID) {
__typename
...ActorInfo
}
}
query Committers($cursor: String) {
organization(login: "NixOS") {
team(slug: "nixpkgs-committers") {
members(first: 100, after: $cursor) {
nodes {
...ActorInfo
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}
query PullRequestForMergeCommit($repositoryID: ID!, $oid: GitObjectID!) {
node(id: $repositoryID) {
__typename
... on Repository {
object(oid: $oid) {
__typename
... on Commit {
associatedPullRequests(first: 1) {
nodes {
...PullRequestInfo
}
pageInfo {
hasNextPage
}
}
}
}
}
}
}
query MergeBotMergesSince($periodStart: DateTime!, $cursor: String) {
repository(owner: "NixOS", name: "nixpkgs") {
# mergebot: Successful merges
# <https://github.com/NixOS/nixpkgs/issues/306934>
issue(number: 306934) {
timelineItems(
itemTypes: [CROSS_REFERENCED_EVENT]
since: $periodStart
last: 100
before: $cursor
) {
nodes {
__typename
... on CrossReferencedEvent {
actor {
...ActorInfo
}
source {
__typename
...PullRequestInfo
}
}
}
pageInfo {
hasPreviousPage
startCursor
}
}
}
}
}
query UnmergedPullRequests($repositoryID: ID!, $cursor: String) {
node(id: $repositoryID) {
__typename
... on Repository {
pullRequests(
states: [OPEN, CLOSED]
orderBy: { field: UPDATED_AT, direction: DESC }
first: 100
after: $cursor
) {
nodes {
...PullRequestInfo
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}