Skip to content

Commit

Permalink
fix: fix event_alert schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtARTs36 committed May 24, 2024
1 parent ccb5932 commit 8b03726
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,23 @@ services:
**event_alert**
| Variable | Type | Description |
|-----------------------------|---------|----------------------------------------------------------|
| hook.Event.IssueURL | string | The API URL for the associated issue |
| hook.Event.IssueID | string | The id of the issue |
| hook.Event.Platform | string | |
| hook.Event.Title | string | The label of the rule that was triggered |
| hook.Event.Type | string | |
| hook.Event.Project | integer | |
| hook.Event.URL | string | |
| hook.Event.Datetime | time | |
| hook.Event.Datetime.Human() | string | Format time to `Y-m-d H:i:s` |
| hook.Event.URL | string | The API URL for the event |
| hook.Request.Method | string | |
| hook.Request.URL | string | |
| hook.Extracted.ProjectName | string | Name of your project, extracted from hook.Event.URL |
| hook.Extracted.Organization | string | Name of your organization, extracted from hook.Event.URL |
| Variable | Type | Description |
|-----------------------------|----------|----------------------------------------------------------|
| hook.Event.IssueURL | string | The API URL for the associated issue |
| hook.Event.IssueID | string | The id of the issue |
| hook.Event.Platform | string | |
| hook.Event.Title | string | The label of the rule that was triggered |
| hook.Event.Type | string | |
| hook.Event.Project | integer | |
| hook.Event.URL | string | |
| hook.Event.Datetime | time | |
| hook.Event.Datetime.Human() | string | Format time to `Y-m-d H:i:s` |
| hook.Event.URL | string | The API URL for the event |
| hook.Event.Fingerprint | string[] | |
| hook.Event.Request.Method | string | |
| hook.Event.Request.URL | string | |
| hook.Extracted.ProjectName | string | Name of your project, extracted from hook.Event.URL |
| hook.Extracted.Organization | string | Name of your organization, extracted from hook.Event.URL |

**issue**

Expand Down
27 changes: 14 additions & 13 deletions internal/sentry/event_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ type EventAlert struct {
Action string `json:"action"`
Data struct {
Event struct {
IssueURL string `json:"issue_url"`
IssueID string `json:"issue_id"`
Platform string `json:"platform"`
Title string `json:"title"`
Type string `json:"type"`
Project int `json:"project"`
URL string `json:"url"`
Datetime Time `json:"datetime"`
WebURL string `json:"web_url"`
IssueURL string `json:"issue_url"`
IssueID string `json:"issue_id"`
Platform string `json:"platform"`
Title string `json:"title"`
Type string `json:"type"`
Project int `json:"project"`
URL string `json:"url"`
Datetime Time `json:"datetime"`
WebURL string `json:"web_url"`
Fingerprint []string `json:"fingerprint"`
Request struct {
Method string `json:"method"`
URL string `json:"url"`
} `json:"request"`
} `json:"event"`
Request struct {
Method string `json:"method"`
URL string `json:"url"`
} `json:"request"`
Extracted struct {
ProjectName string `json:"-"`
OrganizationName string `json:"-"`
Expand Down

0 comments on commit 8b03726

Please sign in to comment.