GitHub Issue Export

This is yet another way to export GitHub issues to a csv file. The thing which might be different about it, is that it can be completely hosted on GitHub pages. This is due to the fact that the GitHub search api works without any authentication (although rate limits do apply).

To bootstrap the application, we just load angular, bootstrap and a few other libs from cdnjs in our static html page and load our main controller.

  <head>
    <script src="//cdnjs.../jquery.min.js"></script>
    <script src="//cdnjs.../angular.min.js"></script>
    <script src="//cdnjs.../angular-route.js"></script>
    <script src="//cdnjs.../moment.min.js"></script>

    <script src="app.js"></script>
    <script src="services.js"></script>
    ...
  </head>

In the controller, we simply set the query parameter using the $location service. This way we can bookmark links to individual searches later.

$scope.query = $location.search().q;

Then we continue with a simple $http call to GitHub to fetch all relevant issues.

$http.get('https://api.github.com/search/issues?q=' +
  $scope.query).then(function(response) {
        var issues = response.data.items;
});

The rest is basically rendering the data in a nice way and transforming it into a csv file. Feel free to check out the running version here and the source code here. Pull requests are welcome.

Written on September 9, 2015