Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ const (
mediaTypeIssueImportAPI = "application/vnd.github.golden-comet-preview+json"

// Media Type values to access preview APIs
// These media types will be added to the API request as headers
// and used to enable particular features on GitHub API that are still in preview.
// After some time, specific media types will be promoted (to a "stable" state).
// From then on, the preview headers are not required anymore to activate the additional
// feature on GitHub.com's API. However, this API header might still be needed for users
// to run a GitHub Enterprise Server on-premise.
// It's not uncommon for GitHub Enterprise Server customers to run older versions which
// would probably rely on the preview headers for some time.
// While the header promotion is going out for GitHub.com, it may be some time before it
// even arrives in GitHub Enterprise Server.
// We keep those preview headers around to avoid breaking older GitHub Enterprise Server
// versions. Additionally, non-functional (preview) headers don't create any side effects
// on GitHub Cloud version.
//
// See https://github.com/google/go-github/pull/2125 for full context.

// https://developer.github.com/changes/2014-12-09-new-attributes-for-stars-api/
mediaTypeStarringPreview = "application/vnd.github.v3.star+json"
Expand Down