Skip to content

Commit ff7d6cf

Browse files
committed
Merge branch 'feature/mentorship-portal' into pr/Rajgupta36/2398
2 parents 7165506 + 7ebe79a commit ff7d6cf

File tree

9 files changed

+213
-6
lines changed

9 files changed

+213
-6
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Generated by Django 5.2.5 on 2025-09-24 13:14
2+
3+
import django.db.models.deletion
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
dependencies = [
9+
("contenttypes", "0002_remove_content_type_name"),
10+
("github", "0035_alter_user_bio_alter_user_is_owasp_staff"),
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name="Comment",
16+
fields=[
17+
(
18+
"id",
19+
models.BigAutoField(
20+
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
21+
),
22+
),
23+
("nest_created_at", models.DateTimeField(auto_now_add=True)),
24+
("nest_updated_at", models.DateTimeField(auto_now=True)),
25+
("github_id", models.BigIntegerField(unique=True, verbose_name="Github ID")),
26+
(
27+
"created_at",
28+
models.DateTimeField(blank=True, null=True, verbose_name="Created at"),
29+
),
30+
(
31+
"updated_at",
32+
models.DateTimeField(
33+
blank=True, db_index=True, null=True, verbose_name="Updated at"
34+
),
35+
),
36+
("body", models.TextField(verbose_name="Body")),
37+
("object_id", models.PositiveIntegerField()),
38+
(
39+
"author",
40+
models.ForeignKey(
41+
null=True,
42+
on_delete=django.db.models.deletion.SET_NULL,
43+
related_name="comments",
44+
to="github.user",
45+
),
46+
),
47+
(
48+
"content_type",
49+
models.ForeignKey(
50+
on_delete=django.db.models.deletion.CASCADE, to="contenttypes.contenttype"
51+
),
52+
),
53+
],
54+
options={
55+
"verbose_name": "Comment",
56+
"verbose_name_plural": "Comments",
57+
"db_table": "github_comments",
58+
"ordering": ("-nest_created_at",),
59+
},
60+
),
61+
]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Generated by Django 5.2.5 on 2025-09-25 08:53
2+
3+
import django.db.models.deletion
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
dependencies = [
9+
("github", "0036_user_has_public_member_page_alter_organization_name_and_more"),
10+
("mentorship", "0004_module_key_program_key_and_more"),
11+
]
12+
13+
operations = [
14+
migrations.AddField(
15+
model_name="issue",
16+
name="level",
17+
field=models.ForeignKey(
18+
blank=True,
19+
help_text="The difficulty level of this issue.",
20+
null=True,
21+
on_delete=django.db.models.deletion.SET_NULL,
22+
related_name="issues",
23+
to="mentorship.tasklevel",
24+
),
25+
),
26+
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Generated by Django 5.2.6 on 2025-11-16 20:15
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("github", "0036_comment"),
9+
("github", "0037_issue_level"),
10+
("github", "0038_pullrequest_related_issues"),
11+
]
12+
13+
operations = []

backend/apps/mentorship/management/commands/sync_module_issues.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ def _process_module(
143143
if task.status != status:
144144
updates["status"] = status
145145

146-
if issue.repository:
146+
# Only fetch assigned_at when needed.
147+
if (created or task.assigned_at is None) and issue.repository:
147148
repo_full_name = self._extract_repo_full_name(issue.repository)
148149
if repo_full_name:
149150
if repo_full_name not in repo_cache:
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Generated by Django 5.2.5 on 2025-09-24 13:14
2+
3+
import django.db.models.deletion
4+
from django.db import migrations, models
5+
6+
7+
class Migration(migrations.Migration):
8+
dependencies = [
9+
("github", "0036_comment"),
10+
("mentorship", "0004_module_key_program_key_and_more"),
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name="IssueUserInterest",
16+
fields=[
17+
(
18+
"id",
19+
models.BigAutoField(
20+
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
21+
),
22+
),
23+
(
24+
"issue",
25+
models.ForeignKey(
26+
on_delete=django.db.models.deletion.CASCADE,
27+
related_name="participant_interests",
28+
to="github.issue",
29+
),
30+
),
31+
(
32+
"module",
33+
models.ForeignKey(
34+
on_delete=django.db.models.deletion.CASCADE,
35+
related_name="interests",
36+
to="mentorship.module",
37+
),
38+
),
39+
(
40+
"user",
41+
models.ForeignKey(
42+
on_delete=django.db.models.deletion.CASCADE,
43+
related_name="mentorship_interests",
44+
to="github.user",
45+
),
46+
),
47+
],
48+
options={
49+
"verbose_name": "Issue User Interest",
50+
"verbose_name_plural": "Issue User Interests",
51+
"db_table": "mentorship_issue_user_interests",
52+
"unique_together": {("module", "issue", "user")},
53+
},
54+
),
55+
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Generated by Django 5.2.6 on 2025-11-16 20:15
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
dependencies = [
8+
("mentorship", "0005_issueuserinterest"),
9+
("mentorship", "0005_remove_task_level_module_issues_and_more"),
10+
]
11+
12+
operations = []

frontend/src/types/__generated__/graphql.ts

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)