Skip to content

Commit 897969c

Browse files
authored
readme: add section on versioning
also remove libraryVersion var in favor of semver tagging on the repo itself. Fixes #376
1 parent e48060a commit 897969c

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,29 @@ straightforward.
238238
[roadmap]: https://docs.google.com/spreadsheet/ccc?key=0ApoVX4GOiXr-dGNKN1pObFh6ek1DR2FKUjBNZ1FmaEE&usp=sharing
239239
[contributing]: CONTRIBUTING.md
240240

241+
## Versioning ##
242+
243+
In general, go-github follows [semver](https://semver.org/) as closely as we
244+
can for tagging releases of the package. For self-contained libraries, the
245+
application of semantic versioning is relatively straightforward and generally
246+
understood. But because go-github is a client library for the GitHub API, which
247+
itself changes behavior, and because we are typically pretty aggressive about
248+
implementing preview features of the GitHub API, we've adopted the following
249+
versioning policy:
250+
251+
* We increment the **major version** with any incompatible change to
252+
non-preview functionality, including changes to the exported Go API surface
253+
or behavior of the API.
254+
* We increment the **minor version** with any backwards-compatible changes to
255+
functionality, as well as any changes to preview functionality in the GitHub
256+
API. GitHub makes no guarantee about the stability of preview functionality,
257+
so neither do we consider it a stable part of the go-github API.
258+
* We increment the **patch version** with any backwards-compatible bug fixes.
259+
260+
Preview functionality may take the form of entire methods or simply additional
261+
data returned from an otherwise non-preview method. Refer to the GitHub API
262+
documentation for details on preview functionality.
263+
241264
## License ##
242265

243266
This library is distributed under the BSD-style license found in the [LICENSE](./LICENSE)

‎github/github.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ import (
2727
)
2828

2929
const (
30-
libraryVersion = "15"
3130
defaultBaseURL = "https://api.github.com/"
3231
uploadBaseURL = "https://uploads.github.com/"
33-
userAgent = "go-github/" + libraryVersion
32+
userAgent = "go-github"
3433

3534
headerRateLimit = "X-RateLimit-Limit"
3635
headerRateRemaining = "X-RateLimit-Remaining"

0 commit comments

Comments
 (0)