Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

investigate PATCH/POST mismatch in IssuesLabelsClient #2125

Closed
shiftkey opened this issue Mar 5, 2020 · 1 comment
Closed

investigate PATCH/POST mismatch in IssuesLabelsClient #2125

shiftkey opened this issue Mar 5, 2020 · 1 comment
Labels
Status: Stale Used by stalebot to clean house Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Comments

@shiftkey
Copy link
Member

shiftkey commented Mar 5, 2020

Docs: https://developer.github.com/v3/issues/labels/#update-a-label

[ManualRoute("PATCH", "/repos/{owner}/{name}/labels/{name}")]
public Task<Label> Update(string owner, string name, string labelName, LabelUpdate labelUpdate)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName));
Ensure.ArgumentNotNull(labelUpdate, nameof(labelUpdate));
// BUG: this should be a PATCH instead of POST
return ApiConnection.Post<Label>(ApiUrls.Label(owner, name, labelName), labelUpdate, AcceptHeaders.LabelsApiPreview);
}

[ManualRoute("PATCH", "/repositories/{id}/labels/{name}")]
public Task<Label> Update(long repositoryId, string labelName, LabelUpdate labelUpdate)
{
Ensure.ArgumentNotNullOrEmptyString(labelName, nameof(labelName));
Ensure.ArgumentNotNull(labelUpdate, nameof(labelUpdate));
// BUG: this should be a PATCH instead of POST
return ApiConnection.Post<Label>(ApiUrls.Label(repositoryId, labelName), labelUpdate, AcceptHeaders.LabelsApiPreview);
}

@github-actions
Copy link

github-actions bot commented Jun 5, 2022

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Stale label Jun 5, 2022
@nickfloyd nickfloyd added Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR Status: Stale Used by stalebot to clean house and removed category: housekeeping labels Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
None yet
Development

No branches or pull requests

2 participants