{"action":"created","issue":{"url":"https://api.github.com/repos/mikedeboer/node-github/issues/415","repository_url":"https://api.github.com/repos/mikedeboer/node-github","labels_url":"https://api.github.com/repos/mikedeboer/node-github/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/mikedeboer/node-github/issues/415/comments","events_url":"https://api.github.com/repos/mikedeboer/node-github/issues/415/events","html_url":"https://github.com/mikedeboer/node-github/issues/415","id":175078515,"number":415,"title":"add support for renaming labels","user":{"login":"Xiphe","id":911218,"avatar_url":"https://avatars.githubusercontent.com/u/911218?v=3","gravatar_id":"","url":"https://api.github.com/users/Xiphe","html_url":"https://github.com/Xiphe","followers_url":"https://api.github.com/users/Xiphe/followers","following_url":"https://api.github.com/users/Xiphe/following{/other_user}","gists_url":"https://api.github.com/users/Xiphe/gists{/gist_id}","starred_url":"https://api.github.com/users/Xiphe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xiphe/subscriptions","organizations_url":"https://api.github.com/users/Xiphe/orgs","repos_url":"https://api.github.com/users/Xiphe/repos","events_url":"https://api.github.com/users/Xiphe/events{/privacy}","received_events_url":"https://api.github.com/users/Xiphe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-05T14:04:56Z","updated_at":"2016-09-05T14:07:56Z","closed_at":null,"body":"**Given** I have a label \"foo\"\r\n\r\n**When** I want to rename it to \"bar\"\r\n\r\n**Then** I use [`github.issues.updateLabel`](http://mikedeboer.github.io/node-github/#api-issues-updateLabel)\r\n\r\n**But** The API only accepts one `name` parameter and I'm unable to define the `oldname`\r\n\r\n---\r\n\r\n### Background\r\n\r\nGitHubs [API to update a label](https://developer.github.com/v3/issues/labels/#update-a-label) supports a `PATCH` request to `https://api.github.com/repos/Jimdo/github-sync-labels-milestones/labels/foo` with `{ name: \"bar\", color: \"ff00ff\" }` parameters. "},"comment":{"url":"https://api.github.com/repos/mikedeboer/node-github/issues/comments/244755291","html_url":"https://github.com/mikedeboer/node-github/issues/415#issuecomment-244755291","issue_url":"https://api.github.com/repos/mikedeboer/node-github/issues/415","id":244755291,"user":{"login":"Xiphe","id":911218,"avatar_url":"https://avatars.githubusercontent.com/u/911218?v=3","gravatar_id":"","url":"https://api.github.com/users/Xiphe","html_url":"https://github.com/Xiphe","followers_url":"https://api.github.com/users/Xiphe/followers","following_url":"https://api.github.com/users/Xiphe/following{/other_user}","gists_url":"https://api.github.com/users/Xiphe/gists{/gist_id}","starred_url":"https://api.github.com/users/Xiphe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xiphe/subscriptions","organizations_url":"https://api.github.com/users/Xiphe/orgs","repos_url":"https://api.github.com/users/Xiphe/repos","events_url":"https://api.github.com/users/Xiphe/events{/privacy}","received_events_url":"https://api.github.com/users/Xiphe/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T14:07:56Z","updated_at":"2016-09-05T14:07:56Z","body":"I'd propose to add a `github.issues.renameLabel` method with this route\r\n\r\n```json\r\n{\r\n  \"rename-label\": {\r\n    \"url\": \"/repos/:user/:repo/labels/:oldname\",\r\n    \"method\": \"PATCH\",\r\n    \"params\": {\r\n      \"$user\": null,\r\n      \"$repo\": null,\r\n      \"$oldname\": null,\r\n      \"$name\": null,\r\n      \"$color\": null\r\n    },\r\n    \"description\": \"Rename a label\"\r\n  }\r\n}\r\n```\r\n\r\n\r\nI'd be happy to propose a PR"}}
{"actor":{"display_login":"Xiphe"}}