-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathconstants.js
More file actions
78 lines (67 loc) · 1.96 KB
/
Copy pathconstants.js
File metadata and controls
78 lines (67 loc) · 1.96 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
/**
* Minimum activity points required for a contributor to appear in Slack reports.
*
* Team members are always included regardless of this threshold.
*/
export const MIN_REQUIRED_ACTIVITY = 5;
/**
* AdGuard filters maintainers.
*
* @see {@link https://github.com/orgs/AdguardTeam/teams/filters-maintainers}
*/
export const TEAM_MEMBERS = [
'Alex-302',
'Sergey-Lyapin',
'AdamWr',
'zloyden',
'BlazDT',
'piquark6046',
'ntnguyen1234',
'ghajini',
'mu-hun',
];
/**
* Usernames to exclude from stats.
*/
export const EXCLUDED_USERNAMES = [
'adguard-bot',
'github-actions[bot]',
];
export const README_URL = 'https://github.com/AdguardTeam/AdGuardFiltersStats#github-stats-cli-app';
export const MILLISECONDS_IN_DAY = 1000 * 60 * 60 * 24;
export const EVENT_EXPIRATION_DAYS = 30;
/**
* Minimum time (ms) between two successful polls before a gap is suspected.
*
* 90 minutes — exceeds the recommended 60-min poll cadence but stays below
* the point where the GitHub Events API (300-event cap) would start losing data.
*/
export const POLL_GAP_THRESHOLD_MS = 90 * 60 * 1000;
export const ENDPOINTS = {
ISSUES: 'GET /repos/{owner}/{repo}/issues',
GITHUB_EVENTS: 'GET /repos/{owner}/{repo}/events',
};
export const EVENT_TYPES = {
ISSUES_EVENT: 'IssuesEvent',
ISSUE_COMMENT_EVENT: 'IssueCommentEvent',
PULL_REQUEST_EVENT: 'PullRequestEvent',
PULL_REQUEST_REVIEW_EVENT: 'PullRequestReviewEvent',
PUSH_EVENT: 'PushEvent',
// These don't represent GitHub API event types
NEW_PULL_EVENT: 'newPullEvent',
MERGED_PULL_EVENT: 'mergePullEvent',
};
export const LABEL_NAMES = {
STALE: 'Stale',
};
export const ACTION_NAMES = {
OPENED: 'opened',
CLOSED: 'closed',
};
export const COLLECTION_FILE_EXTENSION = '.jsonl';
/**
* Maximum number of most recent events to collect.
*
* GitHub Events API only returns up to 300 most recent events.
*/
export const MAX_NUMBER_OF_MOST_RECENT_EVENTS = 300;