func GetRepo(c *gin.Context) {
	var (
		owner = c.Param("owner")
		name  = c.Param("repo")
	)
	repo, err := store.GetRepoOwnerName(c, owner, name)
	if err != nil {
		logrus.Errorf("Error getting repository %s. %s", name, err)
		c.String(404, "Error getting repository %s", name)
		return
	}
	c.JSON(200, repo)
}
GetRepo gets the repository by slug.
package api
import (
	"fmt"
	"github.com/lgtmco/lgtm/cache"
	"github.com/lgtmco/lgtm/model"
	"github.com/lgtmco/lgtm/remote"
	"github.com/lgtmco/lgtm/router/middleware/session"
	"github.com/lgtmco/lgtm/shared/httputil"
	"github.com/lgtmco/lgtm/shared/token"
	"github.com/lgtmco/lgtm/store"
	"github.com/Sirupsen/logrus"
	"github.com/gin-gonic/gin"
)
func GetRepos(c *gin.Context) {
	user := session.User(c)
	repos, err := cache.GetRepos(c, user)
	if err != nil {
		logrus.Errorf("Error getting remote repository list. %s", err)
		c.String(500, "Error getting remote repository list")
		return
	}
	repoc := make([]*model.Repo, len(repos))
	copy(repoc, repos)
	repom, err := store.GetRepoIntersectMap(c, repos)
	if err != nil {
		logrus.Errorf("Error getting active repository list. %s", err)
		c.String(500, "Error getting active repository list")
		return
	}
	for i, repo := range repoc {
		repo_, ok := repom[repo.Slug]
		if ok {
			repoc[i] = repo_
		}
	}
	c.JSON(200, repoc)
}