Overall size of the repository or number of commits
select count(commits.id) as num_commits, projects.name as project_name, projects.url as url
from commits
join project_commits on commits.id = project_commits.project_id
join projects on projects.id = project_commits.project_id
group by projects.id
query = {
'query': {
'bool': {
'must': [
{'range':
{
'tsday': {
'from': dateFrom,
'to': dateTo
}
}
},
{
'term': {
'organisation': dOrg
}
}
]
}
}
}
# Source-specific or view-specific??
if indata.get('source'):
query['query']['bool']['must'].append({'term': {'sourceID': indata.get('source')}})
elif viewList:
query['query']['bool']['must'].append({'terms': {'sourceID': viewList}})
if indata.get('email'):
query['query']['bool']['should'] = [{'term': {'committer_email': indata.get('email')}}, {'term': {'author_email': indata.get('email')}}]
query['query']['bool']['minimum_should_match'] = 1