Skip to content

Conversation

@andygrunwald
Copy link
Contributor

What type of PR is this?

documentation

What this PR does / why we need it:

API preview headers (media types) are used to enable new features in GitHub API.
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, an non-functional (preview) header doesn't create any side effects on GitHub Cloud version.

See #2125 for full context.

Special notes for your reviewer:

This Pull Request was triggered out of a discussion from #2125

Explicit comment

Personally, I prefer and see value in extensive comments that tell the story and the full context next to the code (like in this PR).
I can understand when this interrupts the code reading flow for others.
I do think that the added advantage (by the additional context) is bigger.

Please let me know what you think about it and if any change is required.

Additional documentation, usage docs, etc.:

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, an non-functional (preview) header doesn't create any side effects
on GitHub Cloud version.

See #2125 for full context.
@google-cla google-cla bot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Oct 31, 2021
@codecov
Copy link

codecov bot commented Oct 31, 2021

Codecov Report

Merging #2188 (5a6a845) into master (d1858a3) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2188   +/-   ##
=======================================
  Coverage   97.78%   97.78%           
=======================================
  Files         112      112           
  Lines        9970     9976    +6     
=======================================
+ Hits         9749     9755    +6     
  Misses        154      154           
  Partials       67       67           
Impacted Files Coverage Δ
github/github.go 97.58% <ø> (ø)
github/actions_workflow_jobs.go 100.00% <0.00%> (ø)
github/repos.go 98.66% <0.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d1858a3...5a6a845. Read the comment docs.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @andygrunwald !
Just a couple tiny nits, then LGTM and can be merged.

andygrunwald and others added 3 commits October 31, 2021 15:57
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
@andygrunwald
Copy link
Contributor Author

Thanks for the quick review @gmlewis.
I added your changes.

Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @andygrunwald !
LGTM.
Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indication that the PR author has signed a Google Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants