| <?php |
| /******************************************************************************** |
| * Copyright (c) 2018 The Eclipse Foundation |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License v. 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0. |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| ********************************************************************************/ |
| require_once dirname(__FILE__) . '/../charts.inc'; |
| |
| function chart_project_committer($context) { |
| return ChartBuilder::named('project_committer') |
| ->title("Committer Activity (:startMY to :endMY)") |
| ->description( |
| "Overall committer activity by month based on commits made against |
| project repositories. This excludes the current month.") |
| ->query('dashboard', " |
| select |
| period, |
| committers, |
| participatingCommitters as participating, |
| activeCommitters as active |
| from MonthlySummary |
| where period >= :start and period <= :end") |
| ->column('Month', 'period', 'string', function($value) {return asYearMonth($value);}) |
| ->column('Committers', 'committers', 'number') |
| ->column('Participating', 'participating', 'number') |
| ->column('Active', 'active', 'number') |
| ->substitute(':startMY', $context->getStart()->format('M Y')) |
| ->substitute(':endMY', $context->getEnd()->format('M Y')) |
| ->substitute(':start', $context->getStart()->format('Ym')) |
| ->substitute(':end', $context->getEnd()->format('Ym')); |
| } |
| ?> |