<commit_before>package main

import (
	"crypto/hmac"
	"crypto/sha256"
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"os"

	"github.com/gorilla/mux"
)

const icon = "https://raw.githubusercontent.com/mailgun/media/master/Mailgun_Icon.png"

// Payload is the data provided to Slack Incoming Webhooks.
type Payload struct {
	Text      string `json:"text"`
	Username  string `json:"username"`
	Channel   string `json:"channel,omitempty"`
	IconURL   string `json:"icon_url,omitempty"`
	IconEmoji string `json:"icon_emoji,omitempty"`
}

func main() {
	r := mux.NewRouter()
	r.HandleFunc("/", receiveWebhook).
		Methods("POST")

	http.ListenAndServe("0.0.0.0:8000", r)
}<commit_msg>Read HTTP port for environment variable.<commit_after>package main

import (
	"crypto/hmac"
	"crypto/sha256"
	"encoding/json"
	"fmt"
	"net/http"
	"net/url"
	"os"

	"github.com/gorilla/mux"
)

const icon = "https://raw.githubusercontent.com/mailgun/media/master/Mailgun_Icon.png"

// Payload is the data provided to Slack Incoming Webhooks.
type Payload struct {
	Text      string `json:"text"`
	Username  string `json:"username"`
	Channel   string `json:"channel,omitempty"`
	IconURL   string `json:"icon_url,omitempty"`
	IconEmoji string `json:"icon_emoji,omitempty"`
}

func main() {
	port := os.Getenv("PORT")
	addr := ":" + port

	r := mux.NewRouter()
	r.HandleFunc("/", receiveWebhook).
		Methods("POST")

	http.ListenAndServe(addr, r)
}
{'fraction_non_alphanumeric': 0.15503875968992248, 'fraction_numerical': 0.009866102889358703, 'mean_word_length': 4.546875, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1381339', 'n_tokens_mistral': 531, 'n_tokens_neox': 519, 'n_words': 109}