check if the repos you're depending on are archived upstream.
Currently checks a golang go.mod
file and/or a rust Cargo.toml
vbatts@weasel:~/src/github.com/vbatts/is-archived$ is-archived
INFO[0000] found 'go.mod'. Running `go mod edit -json'
INFO[0000] checking 6 github projects ...
vbatts@possibly:~/src/cc/image-rs$ is-archived
INFO[0000] found 'Cargo.toml'
INFO[0000] "" does not match "attestation_agent"
INFO[0001] "" does not match "ocicrypt-rs"
INFO[0001] "sigstore" does not list a repository
INFO[0001] checking 28 github projects ...
vbatts@possibly:~/src/cc/image-rs$
go install github.com/vbatts/is-archived@latest
With even a project like kubernetes, you'll hit the Github rate limit on the first run.
Go create a personal access token (PAT) on your Github Setting, and export it as a local environment variable.
export GITHUB_TOKEN=<your_github_pat>
- github repo API
- gitlab project API (like https://docs.gitlab.com/ee/api/projects.html#get-single-project)
- bitbucket project API (like https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-get)
- multiple languages
- golang
go.mod
- javascript
packages.json
- rust
Cargo.toml
- rubygems?
- npm?
- who knows?
- golang
- golang to pull-through the HTML
<meta name="go-import" ...
redirects - detect if stdout is terminal or pipe. If Terminal, then get fancy with bubbletea