Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,27 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@v7
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install Go
uses: actions/setup-go@v7
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.15.0
7 changes: 2 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
version: 2
project_name: github_status
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
Expand All @@ -28,7 +25,7 @@ universal_binaries:
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
Expand Down
14 changes: 7 additions & 7 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
- [x] `linters-settings` should be `linters.settings`
- [x] goimports settings go under `formatters.settings.goimports.local-prefixes` (list)
- [x] `issues.exclude-dirs` should be `linters.exclusions.paths`
- [ ] Fix `.goreleaser.yaml`. It fails `goreleaser check`:
- [ ] Add `version: 2`
- [ ] `snapshot.name_template` should be `snapshot.version_template`
- [ ] Remove the no-op `go generate ./...` hook
- [x] Fix `.goreleaser.yaml`. It fails `goreleaser check`:
- [x] Add `version: 2`
- [x] `snapshot.name_template` should be `snapshot.version_template`
- [x] Remove the no-op `go generate ./...` hook
- [x] HTTP handling in `github_status.go`:
- [x] Use an `http.Client` with a timeout instead of `http.Get`
- [x] Close `response.Body`
Expand All @@ -36,11 +36,11 @@

- [x] Split into `fetch(url)` and `render(w io.Writer, summary)`; test `render`
with a JSON fixture and `fetch` with `httptest.NewServer`
- [ ] Add a lint job (`golangci/golangci-lint-action`) to CI
- [x] Add a lint job (`golangci/golangci-lint-action`) to CI
- [x] CI targets Go `oldstable` and `stable` (via `actions/setup-go` aliases)
- [x] Raise `go.mod` to `go 1.26` to match the oldest Go version CI tests
- [ ] Bump `actions/setup-go` / `actions/checkout`
- [ ] Update dependencies (`go get -u ./... && go mod tidy`); `x/sys` v0.25.0 → v0.50.0,
- [x] Bump `actions/setup-go` / `actions/checkout`
- [x] Update dependencies (`go get -u ./... && go mod tidy`); `x/sys` v0.25.0 → v0.50.0,
`fatih/color` v1.18.0 → v1.19.0

## Housekeeping
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/mikemadden42/github_status

go 1.26
go 1.26.0

require github.com/fatih/color v1.18.0
require github.com/fatih/color v1.19.0

require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
golang.org/x/sys v0.25.0 // indirect
github.com/mattn/go-colorable v0.1.16 // indirect
github.com/mattn/go-isatty v0.0.24 // indirect
golang.org/x/sys v0.50.0 // indirect
)
19 changes: 8 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
github.com/fatih/color v1.19.0 h1:Zp3PiM21/9Ld6FzSKyL5c/BULoe/ONr9KlbYVOfG8+w=
github.com/fatih/color v1.19.0/go.mod h1:zNk67I0ZUT1bEGsSGyCZYZNrHuTkJJB+r6Q9VuMi0LE=
github.com/mattn/go-colorable v0.1.16 h1:+2YjeAe7xP1OQbZW1jERPWWCDLlNqFNCvjiqGiAt84A=
github.com/mattn/go-colorable v0.1.16/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI=
github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
Loading