Skip to content

Commit

Permalink
Merge pull request #1646 from theoriginalstove/1643-contributing-guide
Browse files Browse the repository at this point in the history
docs: added a simple contributing guide
  • Loading branch information
svanharmelen committed Jun 21, 2023
2 parents c1a78fc + 1a7fd5c commit d4057c7
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
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

17 changes: 17 additions & 0 deletions Makefile
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ For complete usage of go-gitlab, see the full [package docs](https://godoc.org/g

Sander van Harmelen (<sander@vanharmelen.nl>)

## Contributing

Contributions are always welcome. For more information, check out the [contributing guide](https://github.com/xanzy/go-gitlab/blob/master/CONTRIBUTING.md)

## License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>

0 comments on commit d4057c7

Please sign in to comment.