Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All GitHub issues do not have labels assigned #154

Closed
cachedout opened this issue Sep 17, 2015 · 4 comments · May be fixed by #162
Closed

All GitHub issues do not have labels assigned #154

cachedout opened this issue Sep 17, 2015 · 4 comments · May be fixed by #162
Assignees

Comments

@cachedout
Copy link

I'm running the HEAD of the master branch and I don't see any label information coming down:

MariaDB [bicho]> select count(*) from issues_ext_github where labels is null;
+----------+
| count(*) |
+----------+
|     9775 |
+----------+
1 row in set (0.00 sec)

MariaDB [bicho]> select count(*) from issues_ext_github where labels is not null;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

What additional information could I provide to help find a resolution to this issue?

@cachedout
Copy link
Author

Additionally, I presume that what's supposed to be in there is a delimited list of labels. (Please correct me if I'm wrong!)

It would be really nice if labels were normalized in a way that we could query against them. This is a huge, huge feature for us.

@sduenas
Copy link
Member

sduenas commented Sep 18, 2015

I'm gonna check it. It shouldn't be difficult to add.

@cachedout
Copy link
Author

@sduenas Thank you! I'm excited to see what you find.

@sduenas sduenas self-assigned this Sep 29, 2015
@iganchevup8
Copy link

Here are some more details about this issue.

In fact labels are filled into the 'type' column of the 'issues' table. More of it only one label is taken into account. I think the reason is this part of the code (lines 400 through 403 of the github backend).

        if bug['labels']:
            bug_type = bug['labels'][0]['name']   # FIXME
        else:
            bug_type = unicode('')

IMHO there should be a loop taking into account all the labels an issue might possibly have.
Something like

        if bug['labels']:
            for i in range(0, len(bug['labels'])):
                bug_type.append (bug['labels'][i]['name']   # FIXME
        else:
            bug_type = unicode('')

Didn't try the code, but if you need, I can try to produce a patch.

Another thing is that (IMHO again) labels should go to the 'labels' column of the 'github_issues_ext' table, where they are expected to be and not into the issues table.

iganchevup8 added a commit to iganchevup8/Bicho that referenced this issue Apr 1, 2016
…ey are saved into the 'labels' field of the 'issues_ext_github database' (and not the 'bug_type' field of the 'issues' table). Fixes MetricsGrimoire#154.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants