~sungo/ghch

ghch/query.go -rw-r--r-- 617 bytes
18942019 — sungo include the license in the readme 5 months ago
                                                                                
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
// Original code by sungo ( https://sungo.io ).
// Licensed under the 0BSD License. See the included LICENSE file.

package main

type GqlRequest struct {
	Query string `json:"query"`
}

const GqlQuery = `
query {
	repository(owner:"%s", name:"%s") {
		pullRequests(first: 5, states: MERGED, orderBy: { field: UPDATED_AT, direction: DESC }) {
			nodes {
				author {
					login
				}
				bodyText
				number
				title
				createdAt
				url
				labels(orderBy: { field: NAME, direction: ASC }, first: 100 ) {
					nodes {
						name
					}
				}
				merged
				mergedAt
				mergedBy {
					login
				}
			}
		}
	}
}
`