Code of Conduct API preview is being deprecated #343
Labels
api-repositories
Work to complete the API's defined here: https://developer.github.com/v3/repos/
good first issue
If you're new to the project (or to OSS in general) and you'd like to contribute, try this one.
help wanted
Anyone in the community is welcome to do this work
up for grabs
Anyone in the community is welcome to do this work
Issue Details
Just received a heads-up from GitHub that the
Code of Conduct
API preview which uses thescarlet-witch-preview
header is being deprecated onDecember 6, 2021
.Deprecation Notice: https://github.blog/changelog/2021-10-06-deprecation-notice-codes-of-conduct-api-preview/
It is suggested to migrate to the
Get community profile metrics
endpoint to retrieve this information.Suggested Next Steps
It looks like we definitely need to do the following:
Get-GitHubCommunityProfileMetrics
per thenew API
Then we need to do one of these two things:
GetGitHubCodeOfConduct
since it uses an API endpoint that is going away.or
Get-GitHubCodeOfConduct
to useGet-GitHubCommunityProfileMetrics
behind the scenes, and put the return content into the same format. This should be mostly straight-forward as most of the same data is being returned by the new API, with the exception ofbody
andCodeOfConductKey
... That means thebody
would have to be retrieved with an additional query after theGet-GitHubCommunityProfileMetrics
call, and the$Key
parameter would have to be deprecated entirely since there is no equivalent way to get that information with the new API.My preference would be doing 2.
Reference data
This is the current output of
Get-GitHubCommunityProfileMetrics
formicrosoft/PowerShellForGitHub
and this is the current result for
Get-GitHubCodeOfConduct -OwnerName microsoft -RepositoryName PowerShellForGitHub
The text was updated successfully, but these errors were encountered: