-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathconst.go
More file actions
224 lines (154 loc) · 7.45 KB
/
Copy pathconst.go
File metadata and controls
224 lines (154 loc) · 7.45 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
219
220
221
222
223
224
package devstatscode
// Today - common constant string
const Today string = "today"
// DefaultDataDir - common constant string
const DefaultDataDir string = "/etc/gha2db/"
// Retry - common constant string
const Retry string = "retry"
// Password - common constant string
const Password string = "password"
// GHAAdmin - common constant string
const GHAAdmin string = "gha_admin"
// Quarter - common constant string
const Quarter string = "quarter"
// Now - common constant string
const Now string = "now"
// GHA - common constant string
const GHA string = "gha"
// Localhost - common constant string
const Localhost string = "localhost"
// GHArchiveURL - default GH Archive base URL (gha2db downloads <base>YYYY-MM-DD-H.json.gz from it)
const GHArchiveURL string = "http://data.gharchive.org/"
// Devstats - common constant string
const Devstats string = "devstats"
// DevstatsCode - common constant string
const DevstatsCode string = "devstatscode"
// TimeoutError - common constant string
const TimeoutError string = "{\"error\":\"timeout\"}\n"
// EngineIsClosedError - common constant string
const EngineIsClosedError string = "engine is closed"
// LocalGitScripts - common constant string
const LocalGitScripts string = "./git/"
// Metrics - common constant string
const Metrics string = "metrics/"
// Unset - common constant string
const Unset string = "{{unset}}"
// TimeCol - common constant string
const TimeCol string = "time"
// SeriesCol - common constant string
const SeriesCol string = "series"
// PeriodCol - common constant string
const PeriodCol string = "period"
// Null - common constant string
const Null string = "null"
// HideCfgFile - common constant string
const HideCfgFile string = "hide/hide.csv"
// All - common constant string
const All string = "all"
// ALL - common constant string
const ALL string = "All"
// Kubernetes - common constant string
const Kubernetes string = "kubernetes"
// ArtificialIDBase - artificial (GitHub API sourced) event id base: 2^48.
// Issue/PR timeline events use ArtificialIDBase + REST event id (offsets ~2.8e10 in 2026, growing ~1e10/year).
// API-restored object classes below get uniform 4e12-wide sub-bands (object ids are ~3e9 in 2026, growing <1e9/year),
// so classes cannot collide for centuries. Sync events (ArtificialIDBase + UnixNano/31622) stay >= 329900000000000
// (offset >= ~48.4e12 since 2018 and growing), above all sub-bands.
const ArtificialIDBase int64 = 281474976710656
// ArtificialCommentIDBase - API-restored issue comments
const ArtificialCommentIDBase int64 = ArtificialIDBase + 4000000000000
// ArtificialReviewCommentIDBase - API-restored PR review comments
const ArtificialReviewCommentIDBase int64 = ArtificialIDBase + 8000000000000
// ArtificialCommitCommentIDBase - API-restored commit comments
const ArtificialCommitCommentIDBase int64 = ArtificialIDBase + 12000000000000
// ArtificialReviewIDBase - API-restored PR reviews
const ArtificialReviewIDBase int64 = ArtificialIDBase + 16000000000000
// ArtificialForkIDBase - API-restored forks
const ArtificialForkIDBase int64 = ArtificialIDBase + 20000000000000
// ArtificialReleaseIDBase - API-restored releases
const ArtificialReleaseIDBase int64 = ArtificialIDBase + 24000000000000
// ArtificialIssueIDBase - API-synthesized issue lifecycle events (ghapi2db issues prs pass):
// ArtificialIssueIDBase + 2*issue_id + 0 (opened), + 1 (closed)
const ArtificialIssueIDBase int64 = ArtificialIDBase + 28000000000000
// ArtificialPRIDBase - API-synthesized pull request lifecycle events (ghapi2db issues prs pass):
// ArtificialPRIDBase + 2*pull_request_id + 0 (opened), + 1 (closed)
const ArtificialPRIDBase int64 = ArtificialIDBase + 32000000000000
// SyncEventIDThreshold - event ids >= this are 'sync' events; artificial sub-bands must stay below
const SyncEventIDThreshold int64 = 329900000000000
// NativeIDBandBase - width of one native (GitHub sourced) event id band: 10^12.
// GitHub restarted its event id sequence on 2025-10-09 (ids fell from ~5.6e10 to ~4e9) and since then allocates ids
// from two independent sequences (PushEvent/CreateEvent/DeleteEvent vs every other type) that reuse the 2016-2025 ids
// and each other's ids, so a raw id alone no longer identifies an event. Native events created at/after the epoch of a
// NativeIDBandRules rule are stored (gha_events.id and every *.event_id) as `raw id + band*NativeIDBandBase`, see
// eventid.go: band 0 (the raw id) for everything older than every rule, so history is untouched, bands 1, 2, ... for
// the current sequences. Raw ids stay below 10^12 for decades and 2^48/10^12 = 281 bands fit below ArtificialIDBase,
// so banded ids remain 'native' (0 < id < 2^48) for every consumer; `id / 10^12` is the band, `id % 10^12` the raw id.
const NativeIDBandBase int64 = 1000000000000
// Abuse - common constant string
const Abuse string = "abuse"
// NotFound - common constant string
const NotFound string = "not_found"
// IssueIsDeleted - common constant string
const IssueIsDeleted string = "issue_is_deleted"
// MovedPermanently - common constant string
const MovedPermanently string = "moved_permanently"
// Merged - common constant string
const Merged string = "merged"
// InvalidCatalogName - common constant string
const InvalidCatalogName string = "invalid_catalog_name"
// Nil - common constant string
const Nil string = "(nil)"
// Reconnect - common constant string
const Reconnect string = "reconnect"
// OK - common constant string
const OK string = "ok"
// RepoNamesQuery - common constant string
const RepoNamesQuery string = "select distinct name from gha_repos where name like '%_/_%' and name not like '%/%/%'"
// GithubIDContributions - common constant string
const GithubIDContributions string = "GithubIDContributions"
// DevActCnt - common constant string
const DevActCnt string = "DevActCnt"
// DevActCntComp - common constant string
const DevActCntComp string = "DevActCntComp"
// ComContribRepoGrp - common constant string
const ComContribRepoGrp string = "ComContribRepoGrp"
// CompaniesTable - common constant string
const CompaniesTable string = "CompaniesTable"
// ComStatsRepoGrp - common constant string
const ComStatsRepoGrp string = "ComStatsRepoGrp"
// Health - common constant string
const Health string = "Health"
// Events - common constant string
const Events string = "Events"
// ListAPIs - common constant string
const ListAPIs string = "ListAPIs"
// CumulativeCounts - common constant string
const CumulativeCounts string = "CumulativeCounts"
// ListProjects - common constant string
const ListProjects string = "ListProjects"
// RepoGroups - common constant string
const RepoGroups string = "RepoGroups"
// Ranges - common constant string
const Ranges string = "Ranges"
// Repos - common constant string
const Repos string = "Repos"
// Countries - common constant string
const Countries string = "Countries"
// Companies - common constant string
const Companies string = "Companies"
// SiteStats - common constant string
const SiteStats string = "SiteStats"
// Day - common constant string
const Day string = "day"
// Week - common constant string
const Week string = "week"
// Hour - common constant string
const Hour string = "hour"
// Month - common constant string
const Month string = "month"
// Year - common constant string
const Year string = "year"
// GhostActorID - ID of the 'ghost' placeholder actor GitHub uses for deleted accounts
const GhostActorID int64 = 10137
// GhostActorLogin - login of the 'ghost' placeholder actor GitHub uses for deleted accounts
const GhostActorLogin string = "ghost"