Skip to content

Commit 21f0869

Browse files
Merge branch 'v3release'
2 parents 6ea8b2b + 41b05f5 commit 21f0869

File tree

39 files changed

+18115
-933
lines changed

39 files changed

+18115
-933
lines changed

.github/ISSUE_TEMPLATE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#### Issue Summary
2+
3+
A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples.
4+
5+
6+
#### Steps to Reproduce
7+
8+
1. This is the first step
9+
2. This is the second step
10+
3. Further steps, etc.
11+
12+
Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead?
13+
14+
#### Technical details:
15+
16+
* sendgrid-go Version: master (latest commit: [commit number])
17+
* Go Version: 1.5.1

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
language: go
22
go:
33
- '1.3'
4+
- '1.4'
5+
- '1.5'
46
- tip
57
notifications:
68
hipchat:
@@ -9,6 +11,6 @@ notifications:
911
template:
1012
- '<a href="https://travis-ci.org/%{repository}/builds/%{build_id}">%{repository}
1113
Build %{build_number}</a> on branch <i>%{branch}</i> by %{author}: <strong>%{message}</strong>
12-
<a href="https://github.com/sendgrid/docs/commits/%{commit}">View on GitHub</a>'
14+
<a href="https://github.com/sendgrid/%{repository}/commits/%{commit}">View on GitHub</a>'
1315
format: html
1416
notify: true

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4-
## [2.0.0] - 2015-5-02
4+
## [3.0.0] - 2016-06-14
5+
### Added
6+
- Breaking change to support the v3 Web API
7+
- New HTTP client
8+
- v3 Mail Send helper
9+
10+
## [2.0.0] - 2015-05-02
511
### Changed
612
- Fixed a nasty bug with orphaned connections but drops support for Go versions < 1.3. Thanks [trinchan](https://github.com/sendgrid/sendgrid-go/pull/24)
713

8-
## [1.2.0] - 2015-4-27
14+
## [1.2.0] - 2015-04-27
915
### Added
1016
- Support for API keys
1117

CONTRIBUTING.md

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
Hello! Thank you for choosing to help contribute to one of the SendGrid open source libraries. There are many ways you can contribute and help is always welcome. We simply ask that you follow the following contribution policies.
2+
3+
- [CLAs and CCLAs](#cla)
4+
- [Roadmap & Milestones](#roadmap)
5+
- [Feature Request](#feature_request)
6+
- [Submit a Bug Report](#submit_a_bug_report)
7+
- [Improvements to the Codebase](#improvements_to_the_codebase)
8+
- [Understanding the Code Base](#understanding_the_codebase)
9+
- [Testing](#testing)
10+
- [Style Guidelines & Naming Conventions](#style_guidelines_and_naming_conventions)
11+
- [Creating a Pull Request](#creating_a_pull_request)
12+
13+
<a name="roadmap"></a>
14+
We use [Milestones](https://github.com/sendgrid/sendgrid-go/milestones) to help define current roadmaps, please feel free to grab an issue from the current milestone. Please indicate that you have begun work on it to avoid collisions. Once a PR is made, community review, comments, suggestions and additional PRs are welcomed and encouraged.
15+
16+
<a name="cla"></a>
17+
## CLAs and CCLAs
18+
19+
Before you get started, SendGrid requires that a SendGrid Contributor License Agreement (CLA) or a SendGrid Company Contributor Licensing Agreement (CCLA) be filled out by every contributor to a SendGrid open source project.
20+
21+
Our goal with the CLA and CCLA is to clarify the rights of our contributors and reduce other risks arising from inappropriate contributions. The CLA also clarifies the rights SendGrid holds in each contribution and helps to avoid misunderstandings over what rights each contributor is required to grant to SendGrid when making a contribution. In this way the CLA and CCLA encourage broad participation by our open source community and help us build strong open source projects, free from any individual contributor withholding or revoking rights to any contribution.
22+
23+
SendGrid does not merge a pull request made against a SendGrid open source project until that pull request is associated with a signed CLA (or CCLA). Copies of the CLA and CCLA are available [here](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view).
24+
25+
You may submit your completed [CLA or CCLA](https://drive.google.com/a/sendgrid.com/file/d/0B0PlcM9qA91LN2VEUTJWU2RIVXc/view) to SendGrid at [dx@sendgrid.com](mailto:dx@sendgrid.com). SendGrid will then confirm you are ready to begin making contributions.
26+
27+
There are a few ways to contribute, which we'll enumerate below:
28+
29+
<a name="feature_request"></a>
30+
## Feature Request
31+
32+
If you'd like to make a feature request, please read this section.
33+
34+
The GitHub issue tracker is the preferred channel for library feature requests, but please respect the following restrictions:
35+
36+
- Please **search for existing issues** in order to ensure we don't have duplicate bugs/feature requests.
37+
- Please be respectful and considerate of others when commenting on issues
38+
39+
<a name="submit_a_bug_report"></a>
40+
## Submit a Bug Report
41+
42+
Note: DO NOT include your credentials in ANY code examples, descriptions, or media you make public.
43+
44+
A software bug is a demonstrable issue in the code base. In order for us to diagnose the issue and respond as quickly as possible, please add as much detail as possible into your bug report.
45+
46+
Before you decide to create a new issue, please try the following:
47+
48+
1. Check the Github issues tab if the identified issue has already been reported, if so, please add a +1 to the existing post.
49+
2. Update to the latest version of this code and check if issue has already been fixed
50+
3. Copy and fill in the Bug Report Template we have provided below
51+
52+
### Please use our Bug Report Template
53+
54+
In order to make the process easier, we've included a [sample bug report template](https://github.com/sendgrid/sendgrid-go/.github/ISSUE_TEMPLATE) (borrowed from [Ghost](https://github.com/TryGhost/Ghost/)). The template uses [GitHub flavored markdown](https://help.github.com/articles/github-flavored-markdown/) for formatting.
55+
56+
<a name="improvements_to_the_codebase"></a>
57+
## Improvements to the Codebase
58+
59+
We welcome direct contributions to the sendgrid-go code base. Thank you!
60+
61+
### Development Environment ###
62+
63+
#### Install and Run Locally ####
64+
65+
##### Prerequisites #####
66+
67+
- Go 1.3 through 1.5
68+
- [rest](https://github.com/sendgrid/rest)
69+
70+
##### Initial setup: #####
71+
72+
```bash
73+
git clone https://github.com/sendgrid/sendgrid-go.git
74+
cd sendgrid-go
75+
```
76+
77+
## Environment Variables
78+
79+
First, get your free SendGrid account [here](https://sendgrid.com/free?source=sendgrid-go).
80+
81+
Next, update your environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys).
82+
83+
```bash
84+
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
85+
echo "sendgrid.env" >> .gitignore
86+
source ./sendgrid.env
87+
```
88+
89+
##### Execute: #####
90+
91+
* Check out the documentation for [Web API v3 endpoints](https://sendgrid.com/docs/API_Reference/Web_API_v3/index.html).
92+
* Review the corresponding [example](https://github.com/sendgrid/sendgrid-go/blob/master/examples).
93+
* Update the file
94+
95+
```bash
96+
go run <Desired File>
97+
```
98+
99+
<a name="understanding_the_codebase"></a>
100+
## Understanding the Code Base
101+
102+
**/examples**
103+
104+
Working examples that demonstrate usage.
105+
106+
**sendgrid.go**
107+
108+
The main function that does the heavy lifting (and external entry point) is `API`.
109+
110+
<a name="testing"></a>
111+
## Testing
112+
113+
All PRs require passing tests before the PR will be reviewed.
114+
115+
All test files are in [`sendgrid_test.go`](https://github.com/sendgrid/sendgrid-go/tree/master/sendgrid_test.go).
116+
117+
For the purposes of contributing to this repo, please update the [`sendgrid_test.go`](https://github.com/sendgrid/sendgrid-go/tree/master/sendgrid_test.go) file with unit tests as you modify the code.
118+
119+
To run the tests:
120+
121+
```bash
122+
go test -v
123+
```
124+
125+
<a name="style_guidelines_and_naming_conventions"></a>
126+
## Style Guidelines & Naming Conventions
127+
128+
Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning.
129+
130+
Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning.
131+
132+
- [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
133+
134+
Please run your code through:
135+
136+
- [fmt](https://blog.golang.org/go-fmt-your-code)
137+
138+
139+
## Creating a Pull Request<a name="creating_a_pull_request"></a>
140+
141+
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
142+
and configure the remotes:
143+
144+
```bash
145+
# Clone your fork of the repo into the current directory
146+
git clone https://github.com/sendgrid/sendgrid-go
147+
# Navigate to the newly cloned directory
148+
cd sendgrid-python
149+
# Assign the original repo to a remote called "upstream"
150+
git remote add upstream https://github.com/sendgrid/sendgrid-go
151+
```
152+
153+
2. If you cloned a while ago, get the latest changes from upstream:
154+
155+
```bash
156+
git checkout <dev-branch>
157+
git pull upstream <dev-branch>
158+
```
159+
160+
3. Create a new topic branch (off the main project development branch) to
161+
contain your feature, change, or fix:
162+
163+
```bash
164+
git checkout -b <topic-branch-name>
165+
```
166+
167+
4. Commit your changes in logical chunks. Please adhere to these [git commit
168+
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
169+
or your code is unlikely be merged into the main project. Use Git's
170+
[interactive rebase](https://help.github.com/articles/interactive-rebase)
171+
feature to tidy up your commits before making them public.
172+
173+
4a. Create tests.
174+
175+
4b. Create or update the example code that demonstrates the functionality of this change to the code.
176+
177+
5. Locally merge (or rebase) the upstream development branch into your topic branch:
178+
179+
```bash
180+
git pull [--rebase] upstream master
181+
```
182+
183+
6. Push your topic branch up to your fork:
184+
185+
```bash
186+
git push origin <topic-branch-name>
187+
```
188+
189+
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
190+
with a clear title and description against the `master` branch. All tests must be passing before we will review the PR.
191+
192+
If you have any additional questions, please feel free to [email](mailto:dx@sendgrid.com) us or create an issue in this repo.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 SendGrid
3+
Copyright (c) 2013-2016 SendGrid, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)