Skip to content

Commit dde7741

Browse files
committed
Display more info. about unassigned issues
This commit uses the issues.html general template to display the activity of unassigned issues. It displays some useful information about issues which were not being provided earlier Closes #289
1 parent 2596359 commit dde7741

File tree

9 files changed

+52
-62
lines changed

9 files changed

+52
-62
lines changed

.moban.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ packages:
1111
- ci_build
1212
- meta_review
1313
- model
14-
- unassigned_issues
1514

1615
dependencies:
1716
- getorg~=0.3.1

.nocover.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ nocover_file_globs:
1010
- gsoc/*.py
1111
- ci_build/*.py
1212
- meta_review/handler.py
13-
# Optional coverage. Once off scripts.
14-
- unassigned_issues/unassigned_issues_scraper.py
1513
# The following rules can remain here
1614
# django db
1715
- '*/migrations/*.py'

community/urls.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99

1010
from community.views import (
1111
HomePageView, JoinCommunityView,
12-
OrganizationTeams, InactiveIssuesList
12+
OrganizationTeams, InactiveIssuesList,
13+
UnassignedIssuesActivityList
1314
)
1415
from gci.views import GCIStudentsList
1516
from gci.feeds import LatestTasksFeed as gci_tasks_rss
1617
from ci_build.view_log import BuildLogsView
1718
from data.views import ContributorsListView
1819
from gamification.views import GamificationResults
1920
from meta_review.views import ContributorsMetaReview
20-
from unassigned_issues.unassigned_issues_scraper import (
21-
unassigned_issues_activity_json,
22-
)
2321

2422

2523
def get_index():
@@ -84,10 +82,10 @@ def get_index():
8482
distill_file='inactive-issues/index.html',
8583
),
8684
distill_url(
87-
r'static/unassigned-issues.json', unassigned_issues_activity_json,
88-
name='unassigned_issues_activity_json',
85+
r'unassigned-issues/', UnassignedIssuesActivityList.as_view(),
86+
name='unassigned-issues',
8987
distill_func=get_index,
90-
distill_file='static/unassigned-issues.json',
88+
distill_file='unassigned-issues/index.html',
9189
),
9290
distill_url(
9391
r'gamification/$', GamificationResults.as_view(),

community/views.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
NewcomerPromotion,
2424
Feedback
2525
)
26-
from data.models import Team, InactiveIssue
26+
from data.models import Team, InactiveIssue, UnassignedIssuesActivity
2727
from gamification.models import Participant as GamificationParticipant
2828
from meta_review.models import Participant as MetaReviewer
2929

@@ -234,3 +234,16 @@ def get_context_data(self, **kwargs):
234234
context = get_header_and_footer(context)
235235
context['page_name'] = 'Inactive Issues List'
236236
return context
237+
238+
239+
class UnassignedIssuesActivityList(ListView):
240+
241+
template_name = 'issues.html'
242+
model = UnassignedIssuesActivity
243+
ordering = 'hoster'
244+
245+
def get_context_data(self, **kwargs):
246+
context = super().get_context_data(**kwargs)
247+
context = get_header_and_footer(context)
248+
context['page_name'] = 'Unassigned Issues Activity List'
249+
return context
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Generated by Django 2.1.7 on 2019-08-02 12:07
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('data', '0009_inactiveissue'),
10+
]
11+
12+
operations = [
13+
migrations.CreateModel(
14+
name='UnassignedIssuesActivity',
15+
fields=[
16+
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
17+
('hoster', models.CharField(max_length=30)),
18+
('title', models.CharField(max_length=500)),
19+
('repository', models.CharField(max_length=100)),
20+
('number', models.SmallIntegerField()),
21+
('url', models.URLField()),
22+
],
23+
),
24+
]

data/models.py

+8
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,11 @@ class InactiveIssue(models.Model):
124124
repository = models.CharField(max_length=100)
125125
number = models.SmallIntegerField()
126126
url = models.URLField()
127+
128+
129+
class UnassignedIssuesActivity(models.Model):
130+
hoster = models.CharField(max_length=30)
131+
title = models.CharField(max_length=500)
132+
repository = models.CharField(max_length=100)
133+
number = models.SmallIntegerField()
134+
url = models.URLField()

setup.cfg

-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ testpaths =
1515
gamification
1616
ci_build
1717
meta_review
18-
unassigned_issues
1918

2019
python_files = test_*.py
2120
python_classes = *Test
@@ -78,7 +77,6 @@ omit =
7877
gsoc/*.py
7978
ci_build/*.py
8079
meta_review/handler.py
81-
unassigned_issues/unassigned_issues_scraper.py
8280
*/migrations/*.py
8381
*/management/commands/*.py
8482
meta_review/load_from_db.py

templates/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<li><a href="#">Mentors</a></li>
7373
<li><a href="{% url 'community-gci' %}">Google Code-in Students</a></li>
7474
<li><a href="{% url 'inactive-issues' %}" title="List of all the issues on organization's main repository on which assignee has not shown any activity for more than 2 months.">Inactive issues</a></li>
75-
<li><a href="{% url 'unassigned_issues_activity_json' %}" title="List of all the issues on organization main repository on which someone has opened a pull request without getting assigned to it.">Unassigned issues activity</a></li>
75+
<li><a href="{% url 'unassigned-issues' %}" title="List of all the issues on organization main repository on which someone has opened a pull request without getting assigned to it.">Unassigned issues activity</a></li>
7676
<li><a href="{% url 'ci_build' %}">Project CI Build</a></li>
7777
{% if isTravis %}
7878
<li><a href="{{ travisLink }}" title="This website was built automatically using Travis CI.">TravisCI build info</a></li>

unassigned_issues/unassigned_issues_scraper.py

-48
This file was deleted.

0 commit comments

Comments
 (0)