<commit_before>package heroku

import (
	"net/http"

	"github.com/bgentry/heroku-go"
	"github.com/remind101/empire/empire"
	"github.com/remind101/pkg/httpx"
	"github.com/remind101/pkg/reporter"
	"golang.org/x/net/context"
)

type App heroku.App

func newApp(a *empire.App) *App {
	return &App{
		Id:        a.Name,
		Name:      a.Name,
		CreatedAt: *a.CreatedAt,
	}
}

func newApps(as []*empire.App) []*App {
	apps := make([]*App, len(as))

	for i := 0; i < len(as); i++ {
		apps[i] = newApp(as[i])
	}

	return apps
}

type GetApps struct {
	*empire.Empire
}

func (h *GetApps) ServeHTTPContext(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
	apps, err := h.AppsAll()
	if err != nil {<commit_msg>Expose app ID as ID.<commit_after>package heroku

import (
	"net/http"

	"github.com/bgentry/heroku-go"
	"github.com/remind101/empire/empire"
	"github.com/remind101/pkg/httpx"
	"github.com/remind101/pkg/reporter"
	"golang.org/x/net/context"
)

type App heroku.App

func newApp(a *empire.App) *App {
	return &App{
		Id:        a.ID,
		Name:      a.Name,
		CreatedAt: *a.CreatedAt,
	}
}

func newApps(as []*empire.App) []*App {
	apps := make([]*App, len(as))

	for i := 0; i < len(as); i++ {
		apps[i] = newApp(as[i])
	}

	return apps
}

type GetApps struct {
	*empire.Empire
}

func (h *GetApps) ServeHTTPContext(ctx context.Context, w http.ResponseWriter, r *http.Request) error {
	apps, err := h.AppsAll()
	if err != nil {
{'fraction_non_alphanumeric': 0.1714087439278279, 'fraction_numerical': 0.013879250520471894, 'mean_word_length': 3.5632911392405062, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7121914', 'n_tokens_mistral': 652, 'n_tokens_neox': 619, 'n_words': 126}