{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      },
      {
        "datasource": "psql",
        "enable": true,
        "hide": false,
        "iconColor": "rgba(255, 96, 96, 1)",
        "limit": 100,
        "name": "Releases",
        "query": "SELECT title, description from annotations WHERE $timeFilter order by time asc",
        "rawQuery": "select extract(epoch from time) AS time, title as text, description as tags from sannotations where $__timeFilter(time)",
        "showIn": 0,
        "tagsColumn": "title,description",
        "textColumn": "",
        "titleColumn": "[[full_name]] release",
        "type": "alert"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 15,
  "iteration": 1557311699277,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "psql",
      "decimals": 0,
      "description": "Displays the number of new/episodic issues and the number of new/episodic issues authors.\nThe episodic author is defined as someone who hasn't created issue in the last 3 months and no more than 12 issues overall.",
      "fill": 1,
      "gridPos": {
        "h": 22,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "legend": {
        "alignAsTable": false,
        "avg": true,
        "current": true,
        "hideEmpty": false,
        "hideZero": false,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 1,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "New issue creators",
          "yaxis": 2
        },
        {
          "alias": "Episodic issue creators",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "dsType": "influxdb",
          "format": "time_series",
          "groupBy": [],
          "hide": false,
          "measurement": "reviewers_d",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT \"value\" FROM \"new_issues_[[repogroup]]_issues_[[period]]\" WHERE $timeFilter",
          "rawQuery": true,
          "rawSql": "select\n  time,\n  value as \"Number of PRs from new contributors\"\nfrom\n  snew_contributors\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'new_contrib[[repogroup]]prs'\norder by\n  time",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": []
        },
        {
          "alias": "",
          "dsType": "influxdb",
          "format": "time_series",
          "groupBy": [],
          "hide": false,
          "measurement": "reviewers_d",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT \"value\" FROM \"new_issues_[[repogroup]]_contributors_[[period]]\" WHERE $timeFilter",
          "rawQuery": true,
          "rawSql": "select\n  time,\n  value as \"New contributors\"\nfrom\n  snew_contributors\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'new_contrib[[repogroup]]contrib'\norder by\n  time",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": []
        },
        {
          "alias": "",
          "dsType": "influxdb",
          "format": "time_series",
          "groupBy": [],
          "hide": false,
          "measurement": "reviewers_d",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT \"value\" FROM \"episodic_issues_[[repogroup]]_issues_[[period]]\" WHERE $timeFilter",
          "rawQuery": true,
          "rawSql": "select\n  time,\n  value as \"Number of PRs from episodic contributors\"\nfrom\n  sepisodic_contributors\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'epis_contrib[[repogroup]]prs'\norder by\n  time",
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": []
        },
        {
          "alias": "",
          "dsType": "influxdb",
          "format": "time_series",
          "groupBy": [],
          "hide": false,
          "measurement": "reviewers_d",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT \"value\" FROM \"episodic_issues_[[repogroup]]_contributors_[[period]]\" WHERE $timeFilter",
          "rawQuery": true,
          "rawSql": "select\n  time,\n  value as \"Episodic contributors\"\nfrom\n  sepisodic_contributors\nwhere\n  $__timeFilter(time)\n  and period = '[[period]]'\n  and series = 'epis_contrib[[repogroup]]contrib'\norder by\n  time",
          "refId": "D",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "New/episodic PRs ([[repogroup_name]], [[period]])",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": [
          "total"
        ]
      },
      "yaxes": [
        {
          "format": "none",
          "label": "PRs",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "none",
          "label": "PR creators",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "content": "${docs:raw}",
      "gridPos": {
        "h": 13,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 11,
      "links": [],
      "mode": "html",
      "title": "Dashboard documentation",
      "type": "text"
    }
  ],
  "refresh": false,
  "schemaVersion": 16,
  "style": "dark",
  "tags": [
    "dashboard",
    "opentelemetry",
    "issues"
  ],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "text": "CRI-O",
          "value": "CRI-O"
        },
        "datasource": "psql",
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "full_name",
        "options": [],
        "query": "select value_s from gha_vars where name = 'full_name'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "tags": [],
          "text": "28 Days MA",
          "value": "d28"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Period",
        "multi": false,
        "name": "period",
        "options": [
          {
            "selected": true,
            "text": "28 Days MA",
            "value": "d28"
          },
          {
            "selected": false,
            "text": "Week",
            "value": "w"
          },
          {
            "selected": false,
            "text": "Month",
            "value": "m"
          },
          {
            "selected": false,
            "text": "Quarter",
            "value": "q"
          },
          {
            "selected": false,
            "text": "Year",
            "value": "y"
          }
        ],
        "query": "d,w,m,q,y",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": null,
        "current": {
          "text": "All",
          "value": "All"
        },
        "datasource": "psql",
        "hide": 0,
        "includeAll": false,
        "label": "Repository group",
        "multi": false,
        "name": "repogroup_name",
        "options": [],
        "query": "select all_repo_group_name from tall_repo_groups order by 1",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "all",
          "value": "all"
        },
        "datasource": "psql",
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "repogroup",
        "options": [],
        "query": "select all_repo_group_value from tall_repo_groups where all_repo_group_name = '[[repogroup_name]]'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "text": "<h1 id=\"dashboard-header\">CRI-O new and episodic PR contributors dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>New contributors metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/new_contributors.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>Episodic contributors metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/episodic_contributors.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>New and episodic PR contributors</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/crio/new-and-episodic-pr-contributors.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows statistics about new and episodic PRs and contributors (PR creators).</li>\n<li>New contributor (PR creator) is someone who haven't created any PR before given period.</li>\n<li>New PR is a PR created by new contributor</li>\n<li>Episodic contributor (PR creator) is someone who haven't created any PR in 3 months before given project and haven't created more than 12 PRs overall.</li>\n<li>Episodic PR is a PR created by episodic contributor.</li>\n<li>You can select single repository group or summary for all of them.</li>\n<li>Selecting period (for example week) means that dashboard will calculate statistics in those periods.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\">here</a> for more informations about periods.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\">here</a> for more informations about repository groups.</li>\n</ul>",
          "value": "<h1 id=\"dashboard-header\">CRI-O new and episodic PR contributors dashboard</h1>\n<p>Links:</p>\n<ul>\n<li>New contributors metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/new_contributors.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>Episodic contributors metric <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/episodic_contributors.sql\" target=\"_blank\">SQL file</a>.</li>\n<li>TSDB <a href=\"https://github.com/cncf/devstats/blob/master/metrics/shared/metrics.yaml\" target=\"_blank\">series definition</a>. Search for <code>New and episodic PR contributors</code></li>\n<li>Grafana dashboard <a href=\"https://github.com/cncf/devstats/blob/master/grafana/dashboards/crio/new-and-episodic-pr-contributors.json\" target=\"_blank\">JSON</a>.</li>\n</ul>\n<h1 id=\"description\">Description</h1>\n<ul>\n<li>This dashboard shows statistics about new and episodic PRs and contributors (PR creators).</li>\n<li>New contributor (PR creator) is someone who haven't created any PR before given period.</li>\n<li>New PR is a PR created by new contributor</li>\n<li>Episodic contributor (PR creator) is someone who haven't created any PR in 3 months before given project and haven't created more than 12 PRs overall.</li>\n<li>Episodic PR is a PR created by episodic contributor.</li>\n<li>You can select single repository group or summary for all of them.</li>\n<li>Selecting period (for example week) means that dashboard will calculate statistics in those periods.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/periods.md\" target=\"_blank\">here</a> for more informations about periods.</li>\n<li>See <a href=\"https://github.com/cncf/devstats/blob/master/docs/repository_groups.md\" target=\"_blank\">here</a> for more informations about repository groups.</li>\n</ul>"
        },
        "datasource": "psql",
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "docs",
        "options": [],
        "query": "select value_s from gha_vars where name = 'new_and_episodic_prs_docs_html'",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": true,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-6M",
    "to": "now-1w"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "New and Episodic PR Contributors",
  "uid": "14",
  "version": 2
}
