Skip to content

Commit 7d2c2b1

Browse files
committed
First commit
0 parents  commit 7d2c2b1

40 files changed

+2150
-0
lines changed

.github/ISSUE_TEMPLATE.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!--
2+
If you are reporting a new issue, make sure that we do not have any duplicates
3+
already open. You can ensure this by searching the issue list for this
4+
repository. If there is a duplicate, please close your issue and add a comment
5+
to the existing issue instead.
6+
7+
If you suspect your issue is a bug, please edit your issue description to
8+
include the BUG REPORT INFORMATION shown below. If you fail to provide this
9+
information within 7 days, we cannot debug your issue and will close it. We
10+
will, however, reopen it if you later provide the information.
11+
12+
If you have an issue that can be shown visually, please provide a screenshot or
13+
gif of the problem as well.
14+
15+
---------------------------------------------------
16+
BUG REPORT INFORMATION
17+
---------------------------------------------------
18+
Use the commands below to provide key information from your environment:
19+
You do NOT have to include this information if this is a FEATURE REQUEST
20+
-->
21+
22+
**- Do you want to request a *feature* or report a *bug*?**
23+
24+
**- What is the current behavior?**
25+
26+
**- If the current behavior is a bug, please provide the steps to reproduce.**
27+
28+
**- What is the expected behavior?**
29+
30+
**- Please mention your Go version, and operating system version.**

.github/PULL_REQUEST_TEMPLATE.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!--
2+
Thanks for submitting a pull request!
3+
4+
Please make sure you've read and understood our contributing guidelines;
5+
https://github.com/netlify/git-gateway/blob/master/CONTRIBUTING.md
6+
7+
If this is a bug fix, make sure your description includes "fixes #xxxx", or
8+
"closes #xxxx", where #xxxx is the issue number.
9+
10+
Please provide enough information so that others can review your pull request.
11+
The first three fields are mandatory:
12+
-->
13+
14+
**- Summary**
15+
16+
<!--
17+
Explain the **motivation** for making this change.
18+
What existing problem does the pull request solve?
19+
-->
20+
21+
**- Test plan**
22+
23+
<!--
24+
Demonstrate the code is solid.
25+
Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
26+
-->
27+
28+
**- Description for the changelog**
29+
30+
<!--
31+
Write a short (one line) summary that describes the changes in this
32+
pull request for inclusion in the changelog:
33+
-->
34+
35+
**- A picture of a cute animal (not mandatory but encouraged)**

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.env
2+
gorm.db
3+
vendor/
4+
git-gateway
5+
6+
.DS_Store
7+
.vscode
8+
www/dist/
9+
www/.DS_Store
10+
www/node_modules
11+
npm-debug.log

.travis.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
language: go
3+
4+
services:
5+
- mongodb
6+
addons:
7+
apt:
8+
sources:
9+
- mongodb-3.2-precise
10+
packages:
11+
- mongodb-org-server
12+
13+
go:
14+
- 1.8
15+
16+
env:
17+
- git-gateway_MONGODB_TEST_CONN_URL=127.0.0.1
18+
19+
install: make deps
20+
script: make all
21+
22+
notifications:
23+
email: false

CODE_OF_CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# CONTRIBUTING
2+
3+
Contributions are always welcome, no matter how large or small. Before contributing,
4+
please read the [code of conduct](CODE_OF_CONDUCT.md).
5+
6+
## Setup
7+
8+
> Install Go and Glide https://github.com/Masterminds/glide
9+
10+
```sh
11+
$ git clone https://github.com/netlify/git-gateway
12+
$ cd git-gateway
13+
$ make deps
14+
```
15+
16+
## Building
17+
18+
```sh
19+
$ make build
20+
```
21+
22+
## Testing
23+
24+
```sh
25+
$ make test
26+
```
27+
28+
## Pull Requests
29+
30+
We actively welcome your pull requests.
31+
32+
1. Fork the repo and create your branch from `master`.
33+
2. If you've added code that should be tested, add tests.
34+
3. If you've changed APIs, update the documentation.
35+
4. Ensure the test suite passes.
36+
5. Make sure your code lints.
37+
38+
## License
39+
40+
By contributing to Netlify CMS, you agree that your contributions will be licensed
41+
under its [MIT license](LICENSE).

Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM netlify/go-glide:v0.12.3
2+
3+
ADD . /go/src/github.com/netlify/git-gateway
4+
5+
RUN useradd -m netlify && cd /go/src/github.com/netlify/git-gateway && make deps build && mv git-gateway /usr/local/bin/
6+
7+
USER netlify
8+
CMD ["git-gateway"]

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 Netlify <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.PONY: all build deps image lint test
2+
CHECK_FILES?=$$(go list ./... | grep -v /vendor/)
3+
4+
help: ## Show this help.
5+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
6+
7+
all: lint vet test build ## Run the tests and build the binary.
8+
9+
build: ## Build the binary.
10+
go build -ldflags "-X github.com/netlify/git-gateway/cmd.Version=`git rev-parse HEAD`"
11+
12+
deps: ## Install dependencies.
13+
@go get -u github.com/golang/lint/golint
14+
@go get -u github.com/Masterminds/glide && glide install
15+
16+
image: ## Build the Docker image.
17+
docker build .
18+
19+
lint: ## Lint the code
20+
golint $(CHECK_FILES)
21+
22+
vet: # Vet the code
23+
go vet $(CHECK_FILES)
24+
25+
test: ## Run tests.
26+
go test -v $(CHECK_FILES)

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# git-gateway - Gateway to hosted git APIs

0 commit comments

Comments
 (0)