Skip to content

Commit

Permalink
Display more info. about unassigned issues
Browse files Browse the repository at this point in the history
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
  • Loading branch information
KVGarg committed Aug 5, 2019
1 parent 2596359 commit dde7741
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 62 deletions.
1 change: 0 additions & 1 deletion .moban.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ packages:
- ci_build
- meta_review
- model
- unassigned_issues

dependencies:
- getorg~=0.3.1
Expand Down
2 changes: 0 additions & 2 deletions .nocover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ nocover_file_globs:
- gsoc/*.py
- ci_build/*.py
- meta_review/handler.py
# Optional coverage. Once off scripts.
- unassigned_issues/unassigned_issues_scraper.py
# The following rules can remain here
# django db
- '*/migrations/*.py'
Expand Down
12 changes: 5 additions & 7 deletions community/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@

from community.views import (
HomePageView, JoinCommunityView,
OrganizationTeams, InactiveIssuesList
OrganizationTeams, InactiveIssuesList,
UnassignedIssuesActivityList
)
from gci.views import GCIStudentsList
from gci.feeds import LatestTasksFeed as gci_tasks_rss
from ci_build.view_log import BuildLogsView
from data.views import ContributorsListView
from gamification.views import GamificationResults
from meta_review.views import ContributorsMetaReview
from unassigned_issues.unassigned_issues_scraper import (
unassigned_issues_activity_json,
)


def get_index():
Expand Down Expand Up @@ -84,10 +82,10 @@ def get_index():
distill_file='inactive-issues/index.html',
),
distill_url(
r'static/unassigned-issues.json', unassigned_issues_activity_json,
name='unassigned_issues_activity_json',
r'unassigned-issues/', UnassignedIssuesActivityList.as_view(),
name='unassigned-issues',
distill_func=get_index,
distill_file='static/unassigned-issues.json',
distill_file='unassigned-issues/index.html',
),
distill_url(
r'gamification/$', GamificationResults.as_view(),
Expand Down
15 changes: 14 additions & 1 deletion community/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
NewcomerPromotion,
Feedback
)
from data.models import Team, InactiveIssue
from data.models import Team, InactiveIssue, UnassignedIssuesActivity
from gamification.models import Participant as GamificationParticipant
from meta_review.models import Participant as MetaReviewer

Expand Down Expand Up @@ -234,3 +234,16 @@ def get_context_data(self, **kwargs):
context = get_header_and_footer(context)
context['page_name'] = 'Inactive Issues List'
return context


class UnassignedIssuesActivityList(ListView):

template_name = 'issues.html'
model = UnassignedIssuesActivity
ordering = 'hoster'

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context = get_header_and_footer(context)
context['page_name'] = 'Unassigned Issues Activity List'
return context
24 changes: 24 additions & 0 deletions data/migrations/0010_unassignedissuesactivity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 2.1.7 on 2019-08-02 12:07

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('data', '0009_inactiveissue'),
]

operations = [
migrations.CreateModel(
name='UnassignedIssuesActivity',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('hoster', models.CharField(max_length=30)),
('title', models.CharField(max_length=500)),
('repository', models.CharField(max_length=100)),
('number', models.SmallIntegerField()),
('url', models.URLField()),
],
),
]
8 changes: 8 additions & 0 deletions data/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,11 @@ class InactiveIssue(models.Model):
repository = models.CharField(max_length=100)
number = models.SmallIntegerField()
url = models.URLField()


class UnassignedIssuesActivity(models.Model):
hoster = models.CharField(max_length=30)
title = models.CharField(max_length=500)
repository = models.CharField(max_length=100)
number = models.SmallIntegerField()
url = models.URLField()
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ testpaths =
gamification
ci_build
meta_review
unassigned_issues

python_files = test_*.py
python_classes = *Test
Expand Down Expand Up @@ -78,7 +77,6 @@ omit =
gsoc/*.py
ci_build/*.py
meta_review/handler.py
unassigned_issues/unassigned_issues_scraper.py
*/migrations/*.py
*/management/commands/*.py
meta_review/load_from_db.py
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<li><a href="#">Mentors</a></li>
<li><a href="{% url 'community-gci' %}">Google Code-in Students</a></li>
<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>
<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>
<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>
<li><a href="{% url 'ci_build' %}">Project CI Build</a></li>
{% if isTravis %}
<li><a href="{{ travisLink }}" title="This website was built automatically using Travis CI.">TravisCI build info</a></li>
Expand Down
48 changes: 0 additions & 48 deletions unassigned_issues/unassigned_issues_scraper.py

This file was deleted.

0 comments on commit dde7741

Please sign in to comment.