|
1 | 1 | import copy |
2 | | -import logging |
3 | 2 | import functools |
| 3 | +import logging |
4 | 4 | import os |
5 | 5 | import random |
6 | | -import requests |
7 | | -import pytz |
8 | | -import sentry_sdk |
9 | 6 | import time |
10 | | - |
11 | 7 | from collections import defaultdict |
12 | 8 | from datetime import timedelta |
13 | | -from django.conf import settings |
14 | | -from django.utils import timezone |
15 | | -from hashlib import sha1 |
16 | 9 | from functools import wraps |
17 | | -from uuid import uuid4 |
| 10 | +from hashlib import sha1 |
18 | 11 | from typing import List |
| 12 | +from uuid import uuid4 |
| 13 | + |
| 14 | +import pytz |
| 15 | +import requests |
| 16 | +import sentry_sdk |
| 17 | +from django.conf import settings |
| 18 | +from django.utils import timezone |
19 | 19 |
|
20 | 20 | from sentry.api.utils import get_date_range_from_params |
21 | | -from sentry.discover.models import DiscoverSavedQuery |
22 | 21 | from sentry.discover.endpoints.serializers import DiscoverSavedQuerySerializer |
23 | | -from sentry.incidents.models import AlertRuleThresholdType, AlertRuleTriggerAction |
| 22 | +from sentry.discover.models import DiscoverSavedQuery |
24 | 23 | from sentry.incidents.logic import ( |
25 | 24 | create_alert_rule, |
26 | 25 | create_alert_rule_trigger, |
27 | 26 | create_alert_rule_trigger_action, |
28 | 27 | ) |
| 28 | +from sentry.incidents.models import AlertRuleThresholdType, AlertRuleTriggerAction |
29 | 29 | from sentry.interfaces.user import User as UserInterface |
30 | 30 | from sentry.mediators import project_rules |
31 | 31 | from sentry.models import ( |
|
36 | 36 | Project, |
37 | 37 | ProjectKey, |
38 | 38 | Release, |
39 | | - ReleaseFile, |
40 | 39 | ReleaseCommit, |
| 40 | + ReleaseFile, |
41 | 41 | Repository, |
42 | 42 | Team, |
43 | 43 | ) |
44 | 44 | from sentry.utils import json, loremipsum |
45 | 45 | from sentry.utils.dates import to_timestamp |
46 | | -from sentry.utils.samples import ( |
47 | | - random_geo, |
48 | | - random_ip, |
49 | | - create_sample_event_basic, |
50 | | - random_normal, |
51 | | -) |
| 46 | +from sentry.utils.samples import create_sample_event_basic, random_geo, random_ip, random_normal |
52 | 47 | from sentry.utils.snuba import SnubaError |
53 | 48 |
|
54 | | - |
55 | 49 | commit_message_base_messages = [ |
56 | 50 | "feat: Do something to", |
57 | 51 | "feat: Update code in", |
|
0 commit comments