migrate official plugin repo URL to GitHub Pages

This commit is contained in:
Seth Van Niekerk 2026-06-03 12:36:07 -04:00
parent bdf59b8c19
commit 37e11c8fc4
No known key found for this signature in database
GPG key ID: E86ACA677312A675
2 changed files with 26 additions and 3 deletions

View file

@ -0,0 +1,25 @@
from django.db import migrations
def update_url(apps, schema_editor):
PluginRepo = apps.get_model("plugins", "PluginRepo")
PluginRepo.objects.filter(is_official=True).update(
url="https://dispatcharr.github.io/Plugins/manifest.json"
)
def revert_url(apps, schema_editor):
PluginRepo = apps.get_model("plugins", "PluginRepo")
PluginRepo.objects.filter(is_official=True).update(
url="https://raw.githubusercontent.com/Dispatcharr/Plugins/releases/manifest.json"
)
class Migration(migrations.Migration):
dependencies = [
("plugins", "0002_pluginrepo"),
]
operations = [
migrations.RunPython(update_url, revert_url),
]

View file

@ -36,9 +36,7 @@ class PluginConfig(models.Model):
return f"{self.name} ({self.key})"
OFFICIAL_REPO_URL = (
"https://raw.githubusercontent.com/Dispatcharr/Plugins/releases/manifest.json"
)
OFFICIAL_REPO_URL = "https://dispatcharr.github.io/Plugins/manifest.json"
class PluginRepo(models.Model):