
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
A CLI and Go library for GitHub's CODEOWNERS file.
The codeowners CLI identifies the owners for files in a local repository or directory.
If you're on macOS, you can install the CLI from the homebrew tap.
$ brew tap hmarr/tap
$ brew install codeowners
Otherwise, grab a binary from the releases page or install from source with go install:
$ go install github.com/hmarr/codeowners/cmd/codeowners@latest
By default, the command line tool will walk the directory tree, printing the code owners of any files that are found.
$ codeowners --help
usage: codeowners <path>...
-f, --file string CODEOWNERS file path
-h, --help show this help message
-o, --owner strings filter results by owner
-u, --unowned only show unowned files (can be combined with -o)
$ ls
CODEOWNERS DOCUMENTATION.md README.md example.go example_test.go
$ cat CODEOWNERS
*.go @example/go-engineers
*.md @example/docs-writers
README.md product-manager@example.com
$ codeowners
CODEOWNERS (unowned)
README.md product-manager@example.com
example_test.go @example/go-engineers
example.go @example/go-engineers
DOCUMENTATION.md @example/docs-writers
To limit the files the tool looks at, provide one or more paths as arguments.
$ codeowners *.md
README.md product-manager@example.com
DOCUMENTATION.md @example/docs-writers
Pass the --owner flag to filter results by a specific owner.
$ codeowners -o @example/go-engineers
example_test.go @example/go-engineers
example.go @example/go-engineers
Pass the --unowned flag to only show unowned files.
$ codeowners -u
CODEOWNERS (unowned)
A package for parsing CODEOWNERS files and matching files to owners.
$ go get github.com/hmarr/codeowners
Full documentation is available at pkg.go.dev.
Here's a quick example to get you started:
package main
import (
"fmt"
"log"
"os"
"github.com/hmarr/codeowners"
)
func main() {
file, err := os.Open("CODEOWNERS")
if err != nil {
log.Fatal(err)
}
ruleset, err := codeowners.ParseFile(file)
if err != nil {
log.Fatal(err)
}
rule, err := ruleset.Match("path/to/file")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Owners: %v\n", rule.Owners)
}
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.