Documentation
¶
Overview ¶
Package tag names what a pull request touches with key:value tags, a matching system and nothing more: nine fixed keys, each value normalized to one spelling.
Index ¶
- Constants
- Variables
- func FromObject(raw map[string][]string) (tags, dropped []string)
- func Normalize(key, value string) (string, bool)
- func OpenKeys() []string
- func Parse(s string) (key, value string, ok bool)
- func Vocabulary(v map[string][]Count) string
- func WithSeeds(v map[string][]Count, limit int) map[string][]Count
- type Count
- type Key
Constants ¶
const ( MaxPerKey = 3 Max = 16 )
Variables ¶
var Keys = []Key{ {Name: "lang", Seeds: []string{"python", "go", "typescript", "javascript", "java", "kotlin", "ruby", "rust", "php", "csharp", "cpp", "c", "sql", "shell", "hcl", "yaml", "html", "css", "markdown"}}, {Name: "framework", Seeds: []string{"django", "flask", "fastapi", "react", "nextjs", "vue", "rails", "spring", "express"}}, {Name: "tool", Seeds: []string{"docker", "kubernetes", "terraform", "github-actions", "helm", "make", "npm", "poetry"}}, {Name: "area", Closed: []string{"api", "ui", "cli", "data-model", "migration", "ci", "build", "deps", "docs", "tests", "config", "infra", "observability", "auth", "storage", "messaging", "jobs"}}, {Name: "change", Closed: []string{"feature", "fix", "refac", "perf", "docs", "test", "deps", "config", "chore", "revert", "rename", "removal", "migration", "security"}}, {Name: "concern", Closed: []string{"security", "privacy", "compliance", "performance", "data-loss", "concurrency", "backward-compat", "accessibility", "i18n", "cost", "reliability"}}, {Name: "breaking", Closed: []string{"api", "schema", "config", "behavior", "cli"}}, {Name: "domain"}, {Name: "audience", Closed: []string{"end-user", "internal", "developer", "operator"}}, }
Functions ¶
func FromObject ¶
FromObject normalizes the brief's tag object into key:value tags, in Keys order and then the model's, at most MaxPerKey per key and Max in all; dropped lists, as key:value, what was refused or over a limit.
func Normalize ¶
Normalize gives value's one spelling under key, false when key is not one of Keys or the value does not make a tag.
func Vocabulary ¶
Vocabulary lists, one open key per line in Keys order, the values in use with their counts, then the unused seeds, in the order given.