-
Notifications
You must be signed in to change notification settings - Fork 945
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1646 from theoriginalstove/1643-contributing-guide
docs: added a simple contributing guide
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# How to Contribute | ||
|
||
We want to make contributing to this project as easy as possible. | ||
|
||
## Reporting Issues and Enhancements | ||
|
||
If you have an issue, please report it on the [issue tracker](https://github.com/xanzy/go-gitlab/issues) | ||
|
||
If there is a documented feature within Gitlab | ||
|
||
## Contributing Code | ||
|
||
Pull requests are always welcome. If adding code that needs to be tested, try to add tests if there aren't any. | ||
|
||
We use [`gofumpt`](https://github.com/mvdan/gofumpt) to format this project. | ||
|
||
### Setting up your local development environment to Contribute to `go-gitlab` | ||
|
||
1. [Fork](https://github.com/xanzy/go-gitlab/fork), then clone the repository. | ||
```sh | ||
git clone https://github.com/<your-username>/go-gitlab.git | ||
# or via ssh | ||
git clone git@github.com:<your-username>/go-gitlab.git | ||
``` | ||
1. Install dependencies: | ||
```sh | ||
make setup | ||
``` | ||
1. Make your changes on your feature branch | ||
1. Run the tests and `gofumpt` | ||
```sh | ||
make test && make fmt | ||
``` | ||
1. Open up your pull request | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
setup: | ||
go mod tidy | ||
@go install mvdan.cc/gofumpt@latest | ||
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest | ||
.PHONY: setup | ||
|
||
test: | ||
go test ./... -race #-v?? | ||
.PHONY: test | ||
|
||
fmt: | ||
@gofumpt -l -w . | ||
.PHONY: fmt | ||
|
||
lint: | ||
@golangci-lint run --config .golangci.yml | ||
.PHONY: lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters