Get metrics from GitHubΒΆ

The below example gets the amount of issues from GitHub.

For the GitHub api v3 please set "no_escape": true so that the filter string does not get escaped and is used as it is in the GET call against GitHub.

The used filter itself is using a not existing github account for the assignee field. So the result should always be 0.

GitHub API documentation: https://developer.github.com/v3/search/

{
  "metrics": {
    "github_issues": {
      "source": {
        "type": "rest_github_v3",
        "filter": "repo:useblocks/metricfarmer+type:issue+state:open+assignee:invalid"
      }
    }
  },

  "sources": {
    "rest_github_v3": {
      "class": "mf.rest",
      "url": "https://api.github.com/search/issues",
       "method": "GET",
       "payload": {
         "q": ":MF_REPLACE:filter"
       },
      "no_escape": true,
       "result_call": "result['total_count']"

    }
  },

  "targets": {
    "print": {
      "class": "mf.print"
    }
  }
}