Skip to content

Commit d04b111

Browse files
authored
feat: 254 - allow filtering projects by client for time entries (#255)
* feat: update mockery * feat: time entry commands allow client filter for project * chore: update node verions * chore: changelog * fix: lint node version
1 parent 0de2dec commit d04b111

27 files changed

+1137
-98
lines changed

.github/workflows/golangci-lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20-
- uses: actions/setup-go@v4
20+
- uses: actions/setup-go@v5
2121
with:
2222
go-version: 1.17
23+
cache: false
2324
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@v3
25+
uses: golangci/golangci-lint-action@v4
2526
with:
26-
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
2727
version: latest

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: checkout
1414
uses: actions/checkout@v4
1515
- name: go-setup
16-
uses: actions/setup-go@v4
16+
uses: actions/setup-go@v5
1717
with:
1818
go-version: 1.17
1919
- name: install snapcraft
@@ -23,7 +23,7 @@ jobs:
2323
mkdir -p $HOME/.cache/snapcraft/download
2424
mkdir -p $HOME/.cache/snapcraft/stage-packages
2525
- name: goreleaser-setup
26-
uses: goreleaser/goreleaser-action@v4
26+
uses: goreleaser/goreleaser-action@v5
2727
with:
2828
distribution: goreleaser
2929
version: latest

.github/workflows/test-unit.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Check out code into the Go module directory
99
uses: actions/checkout@v4
1010

11-
- uses: actions/setup-go@v4
11+
- uses: actions/setup-go@v5
1212
with:
1313
go-version: 1.17
1414

@@ -25,7 +25,7 @@ jobs:
2525
./...
2626
2727
- name: Upload coverage report
28-
uses: codecov/codecov-action@v3
28+
uses: codecov/codecov-action@v4
2929
with:
3030
token: ${{ secrets.CODECOV_TOKEN }}
3131
file: ./coverage.txt

.mockery.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
with-expecter: true
2+
dir: "internal/mocks"
3+
packages:
4+
github.com/lucassabreu/clockify-cli/internal/mocks:
5+
interfaces:
6+
Client:
7+
Config:
8+
Factory:

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
## [Unreleased]
1313

14+
### Added
15+
16+
- new flag `--client` to filter projects by client when managing time entries
17+
18+
### Changed
19+
20+
- `mockey` update and its configuration has changed
21+
- github actions steps updated to node20
22+
1423
## [v0.46.0] - 2023-12-06
1524

1625
### Added

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ go-install: deps-install ## install dev version
3636
go install $(MAIN_PKG)
3737

3838
go-generate: deps-install ## recreates generate files
39-
go install github.com/vektra/mockery/v2@v2.15.0
40-
go generate ./...
39+
go install github.com/vektra/mockery/v2@v2.40.3
40+
mockery
4141

4242
test-install: deps-install go-generate
4343
go install gotest.tools/gotestsum@latest

internal/mocks/gen.go

-3
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,14 @@ import (
55
"github.com/lucassabreu/clockify-cli/pkg/cmdutil"
66
)
77

8-
//go:generate mockery --name=Factory --inpackage --with-expecter
98
type Factory interface {
109
cmdutil.Factory
1110
}
1211

13-
//go:generate mockery --name=Config --inpackage --with-expecter
1412
type Config interface {
1513
cmdutil.Config
1614
}
1715

18-
//go:generate mockery --name=Client --inpackage --with-expecter
1916
type Client interface {
2017
api.Client
2118
}

0 commit comments

Comments
 (0)