-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These changes extend the `CommitNotification` model to include an optional field: the github app that emitted a check / comment. ticket: codecov/engineering-team#1737
- Loading branch information
1 parent
f17719a
commit c940d68
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
shared/django_apps/core/migrations/0050_commitnotification_gh_app_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Generated by Django 4.2.13 on 2024-05-21 19:33 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("codecov_auth", "0055_session_login_session"), | ||
("core", "0049_increment_version"), | ||
] | ||
|
||
# BEGIN; | ||
# -- | ||
# -- Add field gh_app to commitnotification | ||
# -- | ||
# ALTER TABLE "commit_notifications" ADD COLUMN "gh_app_id" bigint NULL CONSTRAINT "commit_notifications_gh_app_id_8714fedd_fk_codecov_a" REFERENCES "codecov_auth_githubappinstallation"("id") DEFERRABLE INITIALLY DEFERRED; SET CONSTRAINTS "commit_notifications_gh_app_id_8714fedd_fk_codecov_a" IMMEDIATE; | ||
# -- | ||
# -- Alter field notification_type on commitnotification | ||
# -- | ||
# -- (no-op) | ||
# CREATE INDEX "commit_notifications_gh_app_id_8714fedd" ON "commit_notifications" ("gh_app_id"); | ||
# COMMIT; | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="commitnotification", | ||
name="gh_app", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
related_name="commit_notifications", | ||
to="codecov_auth.githubappinstallation", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="commitnotification", | ||
name="notification_type", | ||
field=models.TextField( | ||
choices=[ | ||
("comment", "Comment"), | ||
("gitter", "Gitter"), | ||
("hipchat", "Hipchat"), | ||
("irc", "Irc"), | ||
("slack", "Slack"), | ||
("status_changes", "Status Changes"), | ||
("status_patch", "Status Patch"), | ||
("status_project", "Status Project"), | ||
("webhook", "Webhook"), | ||
("codecov_slack_app", "Codecov Slack App"), | ||
("checks_project", "Checks Project"), | ||
("checks_changes", "Checks Changes"), | ||
("checks_patch", "Checks Patch"), | ||
] | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters