Skip to content

Commit a83502e

Browse files
committed
Code cleanup and refinements #349
Signed-off-by: tdruez <tdruez@nexb.com>
1 parent 92e4af3 commit a83502e

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

dejacode/settings.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,6 @@ def gettext_noop(s):
458458
daily_at_3am = "0 3 * * *"
459459
DEJACODE_VULNERABILITIES_CRON = env.str("DEJACODE_VULNERABILITIES_CRON", default=daily_at_3am)
460460

461-
# Workflow integrations
462-
DEJACODE_GITHUB_INTEGRATION_TOKEN = env.str("DEJACODE_GITHUB_INTEGRATION_TOKEN", default="")
463-
464461

465462
def enable_rq_eager_mode():
466463
"""

dje/migrations/0008_dataspaceconfiguration_github_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ class Migration(migrations.Migration):
1313
migrations.AddField(
1414
model_name='dataspaceconfiguration',
1515
name='github_token',
16-
field=models.CharField(blank=True, help_text='Personal access token (PAT) or GitHub App token used to authenticateAPI requests for this integration. Keep this token secure.', max_length=255, verbose_name='GitHub token'),
16+
field=models.CharField(blank=True, help_text='Personal access token (PAT) or GitHub App token used to authenticate API requests for this integration. Keep this token secure.', max_length=255, verbose_name='GitHub token'),
1717
),
1818
]

dje/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ class DataspaceConfiguration(models.Model):
523523
max_length=255,
524524
blank=True,
525525
help_text=_(
526-
"Personal access token (PAT) or GitHub App token used to authenticate"
526+
"Personal access token (PAT) or GitHub App token used to authenticate "
527527
"API requests for this integration. Keep this token secure."
528528
),
529529
)

workflow/migrations/0002_requesttemplate_issue_tracker_id_externalissuelink_and_more.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 5.2.4 on 2025-07-16 14:34
1+
# Generated by Django 5.2.4 on 2025-07-30 07:04
22

33
import django.db.models.deletion
44
import uuid
@@ -8,7 +8,7 @@
88
class Migration(migrations.Migration):
99

1010
dependencies = [
11-
('dje', '0007_dejacodeuser_timezone'),
11+
('dje', '0008_dataspaceconfiguration_github_token'),
1212
('workflow', '0001_initial'),
1313
]
1414

@@ -23,7 +23,7 @@ class Migration(migrations.Migration):
2323
fields=[
2424
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
2525
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, verbose_name='UUID')),
26-
('platform', models.CharField(choices=[('github', 'GitHub'), ('gitlab', 'GitLab'), ('jira', 'Jira')], help_text='External issue tracking platform.', max_length=20)),
26+
('platform', models.CharField(choices=[('github', 'GitHub'), ('gitlab', 'GitLab'), ('jira', 'Jira'), ('sourcehut', 'SourceHut')], help_text='External issue tracking platform.', max_length=20)),
2727
('repo', models.CharField(help_text="Repository or project identifier (e.g., 'user/repo-name').", max_length=100)),
2828
('issue_id', models.CharField(help_text='ID or key of the issue on the external platform.', max_length=100)),
2929
('dataspace', models.ForeignKey(editable=False, help_text='A Dataspace is an independent, exclusive set of DejaCode data, which can be either nexB master reference data or installation-specific data.', on_delete=django.db.models.deletion.PROTECT, to='dje.dataspace')),

workflow/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class Platform(models.TextChoices):
9494
GITHUB = "github", _("GitHub")
9595
GITLAB = "gitlab", _("GitLab")
9696
JIRA = "jira", _("Jira")
97+
SOURCEHUT = "sourcehut", _("SourceHut")
9798

9899
platform = models.CharField(
99100
max_length=20, choices=Platform.choices, help_text="External issue tracking platform."

0 commit comments

Comments
 (0)