mirror of https://github.com/grafana/grafana
tool: generate owners for modules in `go.mod` (#69583)
* test: add test for getFiles * fix: fix getFiles test to take in a module name (not modfile name) * move functionality unrelated to getFiles into main func * attempt to getFiles with ParseDir, empty map returned; TODO: restore modowners_generation_script_test.go * test * Revert "test" This reverts commitpull/71598/head2b519f3725
. * Revert "attempt to getFiles with ParseDir, empty map returned; TODO: restore modowners_generation_script_test.go" This reverts commiteb95247487
. * attempt to getFiles with ParseDir, empty map returned; TODO: restore modowners_generation_script_test.go * post-pairing with daniel, can access imports in a file * clean up comments for readability * try to return map of importName: files that import the improt * refactor: change getFiles to accept single import name and return list of files that import it * add log to see importPath and importName * hasImport working * start modowners script & add comments for hasImport * fix modules() and uncomment main * start script to add team names to go.mod, currently can access a map of the import and name * 💩 * calculate root directory to point to correct go.mod * chore: delete unnecessary files * chore: uncomment tests * chore: remove unnecessary comments, update documentation comments with correct cli commands * fix: revert changes in go.mod and go.sum * where is my dependency flag value?? * fix: owners function now can list all owners (with counts) or list a specific owner for a given dependency * fix: change fmt.Println to logger.Println for owners func * partial fix: modules now only prints dependencies owned by given team. -i functionality still not working properly * fix: fix TestModules, modules * chore: update check error message to specify user needs to assign owner to new dependency * fix: adjust punctuation in error string * fix: clean up comments in modowners * chore: remove note in modowners_test
parent
72c92ca187
commit
36264a095f
@ -1,12 +1,16 @@ |
||||
module modowners |
||||
module github.com/grafana/grafana/scripts/modowners |
||||
|
||||
go 1.19 |
||||
|
||||
require golang.org/x/mod v0.10.0 |
||||
require ( |
||||
golang.org/x/mod v0.10.0 |
||||
golang.org/x/tools v0.1.12 |
||||
) |
||||
|
||||
require ( |
||||
github.com/davecgh/go-spew v1.1.1 // indirect |
||||
github.com/pmezard/go-difflib v1.0.0 // indirect |
||||
github.com/stretchr/testify v1.8.3 // indirect |
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect |
||||
gopkg.in/yaml.v3 v3.0.1 // indirect |
||||
) |
||||
|
@ -1,23 +0,0 @@ |
||||
module github.com/grafana/grafana |
||||
|
||||
go 1.19 |
||||
|
||||
require ( |
||||
cloud.google.com/go/storage v1.28.1 // @backend-platform |
||||
cuelang.org/go v0.5.0 // @as-code @backend-platform |
||||
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible // indirect, @delivery |
||||
github.com/Masterminds/semver v1.5.0 // @delivery @backend-platform |
||||
) |
||||
|
||||
require ( |
||||
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 |
||||
github.com/Azure/go-autorest v14.2.0+incompatible // indirect |
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect |
||||
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect |
||||
) |
||||
|
||||
require ( |
||||
cloud.google.com/go/kms v1.4.0 |
||||
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 // @backend-platform |
||||
github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.9.0 // @delivery |
||||
) |
Loading…
Reference in new issue