From e1f29feb8b269e1aa4e49f9b49117030e5f63654 Mon Sep 17 00:00:00 2001 From: Jaime Andres Torres B <69700780+XaurDesu@users.noreply.github.com> Date: Wed, 30 Nov 2022 00:04:44 -0500 Subject: [PATCH 1/9] add go generate mention to CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 25d455b8f7..0d63abac69 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,6 +64,10 @@ are more sensitive, emailed to . messages are able to be formatted properly by various git tools. 1. Finally, push the commits to your fork and submit a [pull request][]. + Before pushing commits, it is highly advised to check for generated files + that were either created or modified for the sake of your commit. Running + `go generate -x ./...` should return a log of modified generated files that should + be included alongside the manually written code in the commit. **NOTE:** Please do not use force-push on PRs in this repo, as it makes it more difficult for reviewers to see what has changed since the last code review. From 920f08e19bae47b71cbeb677691976303a4da96f Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Thu, 2 Feb 2023 21:15:58 -0500 Subject: [PATCH 2/9] add command descriptions + Go documentation link to CONTRIBUTING.MD --- CONTRIBUTING.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d63abac69..17a8224e87 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,26 +44,34 @@ are more sensitive, emailed to . 1. Go makes it very simple to ensure properly formatted code, so always run `go fmt` on your code before committing it. You should also run - [golint][] over your code. As noted in the [golint readme][], it's not - strictly necessary that your code be completely "lint-free", but this will - help you find common style issues. + [go vet][] over your code. this will help you find common style issues + within your code and will keep styling consistent within the project. - 1. Any significant changes should almost always be accompanied by tests. The + 2. Any significant changes should almost always be accompanied by tests. The project already has good test coverage, so look at some of the existing tests if you're unsure how to go about it. [gocov][] and [gocov-html][] are invaluable tools for seeing which parts of your code aren't being exercised by your tests. - 1. Please run: + 3. Please run: * `go generate github.com/google/go-github/...` * `go test github.com/google/go-github/...` * `go vet github.com/google/go-github/...` - 1. Do your best to have [well-formed commit messages][] for each change. + The `go generate ./...` command will update or generate certain files, and the resulting changes should be included in your pull request. + + The `go test ./...` command will run tests inside your code. This will help you spot places where code might be faulty before commiting. + + And finally, the `go vet ./...` command will check linting and styling over your code, keeping the project consistent formatting-wise. + + In any case, it is always a good idea to read official Go documentation when working on this project, as the definition of tools and + commands of the Go programming language is described on further detail there. + + 4. Do your best to have [well-formed commit messages][] for each change. This provides consistency throughout the project, and ensures that commit messages are able to be formatted properly by various git tools. - 1. Finally, push the commits to your fork and submit a [pull request][]. + 5. Finally, push the commits to your fork and submit a [pull request][]. Before pushing commits, it is highly advised to check for generated files that were either created or modified for the sake of your commit. Running `go generate -x ./...` should return a log of modified generated files that should @@ -72,6 +80,7 @@ are more sensitive, emailed to . it more difficult for reviewers to see what has changed since the last code review. +[Go Documentation]: https://pkg.go.dev/std [forking]: https://help.github.com/articles/fork-a-repo [golint]: https://github.com/golang/lint [golint readme]: https://github.com/golang/lint/blob/master/README.md From 9fbf98367dca1f00d8019fe7deed6ee6ef85276e Mon Sep 17 00:00:00 2001 From: Jaime Andres Torres Bermejo <69700780+XaurDesu@users.noreply.github.com> Date: Fri, 3 Feb 2023 13:20:58 -0500 Subject: [PATCH 3/9] Update CONTRIBUTING.md with suggestion Co-authored-by: Parker77 <20973702+Parker77@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17a8224e87..fe826d4558 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,7 +60,7 @@ are more sensitive, emailed to . The `go generate ./...` command will update or generate certain files, and the resulting changes should be included in your pull request. - The `go test ./...` command will run tests inside your code. This will help you spot places where code might be faulty before commiting. + The `go test ./...` command will run tests inside your code. This will help you spot places where code might be faulty before committing. And finally, the `go vet ./...` command will check linting and styling over your code, keeping the project consistent formatting-wise. From ed25857d2d1dafb4b348c3ea2dc7b362cc54dadb Mon Sep 17 00:00:00 2001 From: Jaime Andres Torres Bermejo <69700780+XaurDesu@users.noreply.github.com> Date: Fri, 3 Feb 2023 13:21:19 -0500 Subject: [PATCH 4/9] Update CONTRIBUTING.md with suggestion Co-authored-by: Parker77 <20973702+Parker77@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe826d4558..894883e473 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,7 @@ are more sensitive, emailed to . And finally, the `go vet ./...` command will check linting and styling over your code, keeping the project consistent formatting-wise. In any case, it is always a good idea to read official Go documentation when working on this project, as the definition of tools and - commands of the Go programming language is described on further detail there. + commands of the Go programming language is described in further detail there. 4. Do your best to have [well-formed commit messages][] for each change. This provides consistency throughout the project, and ensures that commit From 74dcf5a3539f0b139ce1a15a3b23cb97330d785c Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Fri, 3 Feb 2023 13:25:22 -0500 Subject: [PATCH 5/9] revert numbering changes --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 894883e473..30f62b8ca4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,13 +47,13 @@ are more sensitive, emailed to . [go vet][] over your code. this will help you find common style issues within your code and will keep styling consistent within the project. - 2. Any significant changes should almost always be accompanied by tests. The + 1. Any significant changes should almost always be accompanied by tests. The project already has good test coverage, so look at some of the existing tests if you're unsure how to go about it. [gocov][] and [gocov-html][] are invaluable tools for seeing which parts of your code aren't being exercised by your tests. - 3. Please run: + 1. Please run: * `go generate github.com/google/go-github/...` * `go test github.com/google/go-github/...` * `go vet github.com/google/go-github/...` @@ -67,11 +67,11 @@ are more sensitive, emailed to . In any case, it is always a good idea to read official Go documentation when working on this project, as the definition of tools and commands of the Go programming language is described in further detail there. - 4. Do your best to have [well-formed commit messages][] for each change. + 1. Do your best to have [well-formed commit messages][] for each change. This provides consistency throughout the project, and ensures that commit messages are able to be formatted properly by various git tools. - 5. Finally, push the commits to your fork and submit a [pull request][]. + 1. Finally, push the commits to your fork and submit a [pull request][]. Before pushing commits, it is highly advised to check for generated files that were either created or modified for the sake of your commit. Running `go generate -x ./...` should return a log of modified generated files that should From a006a423dd5994df5b3f1d3b30c21786da1cedf6 Mon Sep 17 00:00:00 2001 From: Jaime Torres Date: Fri, 3 Feb 2023 13:27:05 -0500 Subject: [PATCH 6/9] format line length --- CONTRIBUTING.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 30f62b8ca4..39d48da84a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,14 +58,18 @@ are more sensitive, emailed to . * `go test github.com/google/go-github/...` * `go vet github.com/google/go-github/...` - The `go generate ./...` command will update or generate certain files, and the resulting changes should be included in your pull request. + The `go generate ./...` command will update or generate certain files, and the + resulting changes should be included in your pull request. - The `go test ./...` command will run tests inside your code. This will help you spot places where code might be faulty before committing. + The `go test ./...` command will run tests inside your code. This will help you + spot places where code might be faulty before committing. - And finally, the `go vet ./...` command will check linting and styling over your code, keeping the project consistent formatting-wise. + And finally, the `go vet ./...` command will check linting and styling over your + code, keeping the project consistent formatting-wise. - In any case, it is always a good idea to read official Go documentation when working on this project, as the definition of tools and - commands of the Go programming language is described in further detail there. + In any case, it is always a good idea to read official Go documentation when working + on this project, as the definition of tools and commands of the Go programming + language is described in further detail there. 1. Do your best to have [well-formed commit messages][] for each change. This provides consistency throughout the project, and ensures that commit @@ -141,4 +145,5 @@ this][modified-comment]. [rebase-comment]: https://github.com/google/go-github/pull/277#issuecomment-183035491 [modified-comment]: https://github.com/google/go-github/pull/280#issuecomment-184859046 -**When creating a release, don't forget to update the `Version` constant in `github.go`.** This is used to send the version in the `User-Agent` header to identify clients to the GitHub API. +**When creating a release, don't forget to update the `Version` constant in `github.go`.** This is used to +send the version in the `User-Agent` header to identify clients to the GitHub API. From f0028b6e5dc42f8fc8c5f33baa9a06a4e8ac078f Mon Sep 17 00:00:00 2001 From: Jaime Andres Torres Bermejo <69700780+XaurDesu@users.noreply.github.com> Date: Sat, 4 Feb 2023 12:29:27 -0500 Subject: [PATCH 7/9] Update CONTRIBUTING.md Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 39d48da84a..c25f287045 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -84,7 +84,7 @@ are more sensitive, emailed to . it more difficult for reviewers to see what has changed since the last code review. -[Go Documentation]: https://pkg.go.dev/std +[official Go documentation]: https://pkg.go.dev/std [forking]: https://help.github.com/articles/fork-a-repo [golint]: https://github.com/golang/lint [golint readme]: https://github.com/golang/lint/blob/master/README.md From a69ca5bd20080595a5fdd1fc5bafb7b36af3f9fb Mon Sep 17 00:00:00 2001 From: Jaime Andres Torres Bermejo <69700780+XaurDesu@users.noreply.github.com> Date: Sat, 4 Feb 2023 12:29:40 -0500 Subject: [PATCH 8/9] Update CONTRIBUTING.md Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c25f287045..d64ae8ad75 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -67,7 +67,7 @@ are more sensitive, emailed to . And finally, the `go vet ./...` command will check linting and styling over your code, keeping the project consistent formatting-wise. - In any case, it is always a good idea to read official Go documentation when working + In any case, it is always a good idea to read [official Go documentation][] when working on this project, as the definition of tools and commands of the Go programming language is described in further detail there. From 68995d12e7681d952d3e5f4f5178fa23380f59ae Mon Sep 17 00:00:00 2001 From: Jaime Andres Torres Bermejo <69700780+XaurDesu@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:57:23 -0500 Subject: [PATCH 9/9] Update CONTRIBUTING.md Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com> --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d64ae8ad75..fb3660461f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -86,8 +86,7 @@ are more sensitive, emailed to . [official Go documentation]: https://pkg.go.dev/std [forking]: https://help.github.com/articles/fork-a-repo -[golint]: https://github.com/golang/lint -[golint readme]: https://github.com/golang/lint/blob/master/README.md +[go vet]: https://pkg.go.dev/cmd/vet [gocov]: https://github.com/axw/gocov [gocov-html]: https://github.com/matm/gocov-html [well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html