{"action":"created","comment":{"url":"https://api.github.com/repos/openthread/openthread/pulls/comments/218409909","pull_request_review_id":156304778,"id":218409909,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODQwOTkwOQ==","diff_hunk":"@@ -0,0 +1,299 @@\n+/*\n+ *  Copyright (c) 2018, The OpenThread Authors.\n+ *  All rights reserved.\n+ *\n+ *  Redistribution and use in source and binary forms, with or without\n+ *  modification, are permitted provided that the following conditions are met:\n+ *  1. Redistributions of source code must retain the above copyright\n+ *     notice, this list of conditions and the following disclaimer.\n+ *  2. Redistributions in binary form must reproduce the above copyright\n+ *     notice, this list of conditions and the following disclaimer in the\n+ *     documentation and/or other materials provided with the distribution.\n+ *  3. Neither the name of the copyright holder nor the\n+ *     names of its contributors may be used to endorse or promote products\n+ *     derived from this software without specific prior written permission.\n+ *\n+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n+ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n+ *  POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+/**\n+ * @file\n+ *   This file implements unique service manager.\n+ */\n+\n+#include \"utils/unique_service_manager.hpp\"\n+#include \"common/code_utils.hpp\"\n+#include \"common/instance.hpp\"\n+#include \"common/owner-locator.hpp\"\n+#include \"common/random.hpp\"\n+#include \"net/netif.hpp\"\n+\n+#if OPENTHREAD_ENABLE_SERVICE\n+\n+namespace ot {\n+namespace Utils {\n+\n+UniqueServiceManager::UniqueServiceManager(Instance &aInstance)\n+    : InstanceLocator(aInstance)\n+    , mTimer(aInstance, &UniqueServiceManager::HandleTimer, this)\n+    , mNotifierCallback(&UniqueServiceManager::HandleStateChanged, this)\n+{\n+    memset(mEntries, 0, sizeof(mEntries));\n+    aInstance.GetNotifier().RegisterCallback(mNotifierCallback);\n+}\n+\n+otError UniqueServiceManager::RegisterService(const otServiceConfig * aConfig,\n+                                              otServiceUpdateCallback aServiceUpdateCallback,\n+                                              otServerCompareCallback aServerCompareCallback,\n+                                              void *                  aContext)\n+{\n+    otError         error = OT_ERROR_NONE;\n+    otServiceConfig config;\n+    bool            rlocIn;\n+    uint8_t         i;\n+\n+    for (i = 0; i < OT_ARRAY_LENGTH(mEntries); i++)\n+    {\n+        if (mEntries[i].mServiceConfig == NULL)\n+        {\n+            break;\n+        }\n+    }\n+\n+    VerifyOrExit(i < OT_ARRAY_LENGTH(mEntries), error = OT_ERROR_NO_BUFS);\n+\n+    mEntries[i].mServiceConfig         = aConfig;\n+    mEntries[i].mServiceUpdateCallback = aServiceUpdateCallback;\n+    mEntries[i].mServerCompareCallback = aServerCompareCallback != NULL ? aServerCompareCallback : DefaultServerCompare;\n+    mEntries[i].mContext               = aContext;\n+\n+    if (NetworkDataLeaderServiceLookup(i, config, rlocIn) == OT_ERROR_NONE)\n+    {\n+        mEntries[i].mServiceUpdateCallback(&config, mEntries[i].mContext);\n+    }\n+    else\n+    {\n+        AddNetworkDataLocalService(*mEntries[i].mServiceConfig);\n+        GetNetif().GetNetworkDataLocal().SendServerDataNotification();\n+    }\n+\n+exit:\n+    return error;\n+}\n+\n+otError UniqueServiceManager::UnregisterService(uint32_t       aEnterpriseNumber,\n+                                                const uint8_t *aServiceData,\n+                                                uint8_t        aServiceDataLength)\n+{\n+    otError         error = OT_ERROR_NONE;\n+    otServiceConfig config;\n+    bool            rlocIn;\n+    uint8_t         i;\n+\n+    for (i = 0; i < OT_ARRAY_LENGTH(mEntries); i++)\n+    {\n+        if (mEntries[i].mServiceConfig != NULL && mEntries[i].mServiceConfig->mEnterpriseNumber == aEnterpriseNumber &&\n+            mEntries[i].mServiceConfig->mServiceDataLength == aServiceDataLength &&\n+            memcmp(mEntries[i].mServiceConfig->mServiceData, aServiceData, aServiceDataLength) == 0)\n+        {\n+            break;\n+        }\n+    }\n+\n+    VerifyOrExit(i < OT_ARRAY_LENGTH(mEntries), error = OT_ERROR_NOT_FOUND);\n+\n+    if (NetworkDataLeaderServiceLookup(i, config, rlocIn) == OT_ERROR_NONE && rlocIn)\n+    {\n+        RemoveNetworkDataLocalService(*mEntries[i].mServiceConfig);\n+        GetNetif().GetNetworkDataLocal().SendServerDataNotification();\n+    }\n+\n+    memset(&mEntries[i], 0, sizeof(ServiceEntry));\n+\n+exit:\n+    return error;\n+}\n+\n+void UniqueServiceManager::HandleStateChanged(Notifier::Callback &aCallback, otChangedFlags aFlags)\n+{\n+    aCallback.GetOwner<UniqueServiceManager>().HandleStateChanged(aFlags);\n+}\n+\n+void UniqueServiceManager::HandleStateChanged(otChangedFlags aFlags)\n+{\n+    otServiceConfig config;\n+    bool            rlocIn;\n+    bool            startTimer = false;\n+\n+    VerifyOrExit((aFlags & OT_CHANGED_THREAD_NETDATA) != 0);\n+\n+    for (uint8_t i = 0; i < OT_ARRAY_LENGTH(mEntries); i++)\n+    {\n+        if (mEntries[i].mServiceConfig == NULL)\n+        {\n+            continue;\n+        }\n+\n+        if (NetworkDataLeaderServiceLookup(i, config, rlocIn) == OT_ERROR_NONE)\n+        {\n+            // If the server is not selected as the primary server, it should unregister the service.\n+            if (rlocIn && config.mServerConfig.mRloc16 != GetNetif().GetMle().GetRloc16())\n+            {\n+                // MLE layer will send SVR_DATA.ntf when it detects the mismatch between NetworkDataLeader and\n+                // NetworkDataLocal in the function HandleStateChanged().\n+                RemoveNetworkDataLocalService(*mEntries[i].mServiceConfig);\n+            }\n+\n+            mEntries[i].mServiceUpdateCallback(&config, mEntries[i].mContext);","path":"src/core/utils/unique_service_manager.cpp","position":157,"original_position":157,"commit_id":"970b5decd17b9bc686325428be4d2fc6b38d5e06","original_commit_id":"970b5decd17b9bc686325428be4d2fc6b38d5e06","user":{"login":"librasungirl","id":19217991,"node_id":"MDQ6VXNlcjE5MjE3OTkx","avatar_url":"https://avatars2.githubusercontent.com/u/19217991?v=4","gravatar_id":"","url":"https://api.github.com/users/librasungirl","html_url":"https://github.com/librasungirl","followers_url":"https://api.github.com/users/librasungirl/followers","following_url":"https://api.github.com/users/librasungirl/following{/other_user}","gists_url":"https://api.github.com/users/librasungirl/gists{/gist_id}","starred_url":"https://api.github.com/users/librasungirl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/librasungirl/subscriptions","organizations_url":"https://api.github.com/users/librasungirl/orgs","repos_url":"https://api.github.com/users/librasungirl/repos","events_url":"https://api.github.com/users/librasungirl/events{/privacy}","received_events_url":"https://api.github.com/users/librasungirl/received_events","type":"User","site_admin":false},"body":"should we clear `mEntries[i]` here?","created_at":"2018-09-18T12:26:38Z","updated_at":"2018-09-18T12:30:45Z","html_url":"https://github.com/openthread/openthread/pull/3013#discussion_r218409909","pull_request_url":"https://api.github.com/repos/openthread/openthread/pulls/3013","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openthread/openthread/pulls/comments/218409909"},"html":{"href":"https://github.com/openthread/openthread/pull/3013#discussion_r218409909"},"pull_request":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3013"}}},"pull_request":{"url":"https://api.github.com/repos/openthread/openthread/pulls/3013","id":212665145,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNjY1MTQ1","html_url":"https://github.com/openthread/openthread/pull/3013","diff_url":"https://github.com/openthread/openthread/pull/3013.diff","patch_url":"https://github.com/openthread/openthread/pull/3013.patch","issue_url":"https://api.github.com/repos/openthread/openthread/issues/3013","number":3013,"state":"open","locked":false,"title":"[network-data] elect a server as primary server to provide service","user":{"login":"zhanglongxia","id":12897117,"node_id":"MDQ6VXNlcjEyODk3MTE3","avatar_url":"https://avatars1.githubusercontent.com/u/12897117?v=4","gravatar_id":"","url":"https://api.github.com/users/zhanglongxia","html_url":"https://github.com/zhanglongxia","followers_url":"https://api.github.com/users/zhanglongxia/followers","following_url":"https://api.github.com/users/zhanglongxia/following{/other_user}","gists_url":"https://api.github.com/users/zhanglongxia/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanglongxia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanglongxia/subscriptions","organizations_url":"https://api.github.com/users/zhanglongxia/orgs","repos_url":"https://api.github.com/users/zhanglongxia/repos","events_url":"https://api.github.com/users/zhanglongxia/events{/privacy}","received_events_url":"https://api.github.com/users/zhanglongxia/received_events","type":"User","site_admin":false},"body":"If there is no server to provide the service, the server sends SVR_DATA.ntf to the leader to add the service to NetworkData Leader. If multiple servers provide the same service at the same time, the server that is not elected as the primary server sends SVR_DATA.ntf to the leader to delete the service from the NetworkData Leader. Only the primary server provides the service.\r\n","created_at":"2018-09-03T07:43:28Z","updated_at":"2018-09-18T12:30:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d753c4e7c795026c1c402b057b8f4b81bdc7a23d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jwhui","id":16142208,"node_id":"MDQ6VXNlcjE2MTQyMjA4","avatar_url":"https://avatars3.githubusercontent.com/u/16142208?v=4","gravatar_id":"","url":"https://api.github.com/users/jwhui","html_url":"https://github.com/jwhui","followers_url":"https://api.github.com/users/jwhui/followers","following_url":"https://api.github.com/users/jwhui/following{/other_user}","gists_url":"https://api.github.com/users/jwhui/gists{/gist_id}","starred_url":"https://api.github.com/users/jwhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwhui/subscriptions","organizations_url":"https://api.github.com/users/jwhui/orgs","repos_url":"https://api.github.com/users/jwhui/repos","events_url":"https://api.github.com/users/jwhui/events{/privacy}","received_events_url":"https://api.github.com/users/jwhui/received_events","type":"User","site_admin":false},{"login":"abtink","id":17729664,"node_id":"MDQ6VXNlcjE3NzI5NjY0","avatar_url":"https://avatars3.githubusercontent.com/u/17729664?v=4","gravatar_id":"","url":"https://api.github.com/users/abtink","html_url":"https://github.com/abtink","followers_url":"https://api.github.com/users/abtink/followers","following_url":"https://api.github.com/users/abtink/following{/other_user}","gists_url":"https://api.github.com/users/abtink/gists{/gist_id}","starred_url":"https://api.github.com/users/abtink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abtink/subscriptions","organizations_url":"https://api.github.com/users/abtink/orgs","repos_url":"https://api.github.com/users/abtink/repos","events_url":"https://api.github.com/users/abtink/events{/privacy}","received_events_url":"https://api.github.com/users/abtink/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":397568980,"node_id":"MDU6TGFiZWwzOTc1Njg5ODA=","url":"https://api.github.com/repos/openthread/openthread/labels/P4","name":"P4","color":"AFDF00","default":false},{"id":355043113,"node_id":"MDU6TGFiZWwzNTUwNDMxMTM=","url":"https://api.github.com/repos/openthread/openthread/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/openthread/openthread/pulls/3013/commits","review_comments_url":"https://api.github.com/repos/openthread/openthread/pulls/3013/comments","review_comment_url":"https://api.github.com/repos/openthread/openthread/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openthread/openthread/issues/3013/comments","statuses_url":"https://api.github.com/repos/openthread/openthread/statuses/970b5decd17b9bc686325428be4d2fc6b38d5e06","head":{"label":"zhanglongxia:uservice","ref":"uservice","sha":"970b5decd17b9bc686325428be4d2fc6b38d5e06","user":{"login":"zhanglongxia","id":12897117,"node_id":"MDQ6VXNlcjEyODk3MTE3","avatar_url":"https://avatars1.githubusercontent.com/u/12897117?v=4","gravatar_id":"","url":"https://api.github.com/users/zhanglongxia","html_url":"https://github.com/zhanglongxia","followers_url":"https://api.github.com/users/zhanglongxia/followers","following_url":"https://api.github.com/users/zhanglongxia/following{/other_user}","gists_url":"https://api.github.com/users/zhanglongxia/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanglongxia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanglongxia/subscriptions","organizations_url":"https://api.github.com/users/zhanglongxia/orgs","repos_url":"https://api.github.com/users/zhanglongxia/repos","events_url":"https://api.github.com/users/zhanglongxia/events{/privacy}","received_events_url":"https://api.github.com/users/zhanglongxia/received_events","type":"User","site_admin":false},"repo":{"id":114196102,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQxOTYxMDI=","name":"openthread","full_name":"zhanglongxia/openthread","private":false,"owner":{"login":"zhanglongxia","id":12897117,"node_id":"MDQ6VXNlcjEyODk3MTE3","avatar_url":"https://avatars1.githubusercontent.com/u/12897117?v=4","gravatar_id":"","url":"https://api.github.com/users/zhanglongxia","html_url":"https://github.com/zhanglongxia","followers_url":"https://api.github.com/users/zhanglongxia/followers","following_url":"https://api.github.com/users/zhanglongxia/following{/other_user}","gists_url":"https://api.github.com/users/zhanglongxia/gists{/gist_id}","starred_url":"https://api.github.com/users/zhanglongxia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhanglongxia/subscriptions","organizations_url":"https://api.github.com/users/zhanglongxia/orgs","repos_url":"https://api.github.com/users/zhanglongxia/repos","events_url":"https://api.github.com/users/zhanglongxia/events{/privacy}","received_events_url":"https://api.github.com/users/zhanglongxia/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhanglongxia/openthread","description":"OpenThread released by Nest is an open-source implementation of the Thread networking protocol","fork":true,"url":"https://api.github.com/repos/zhanglongxia/openthread","forks_url":"https://api.github.com/repos/zhanglongxia/openthread/forks","keys_url":"https://api.github.com/repos/zhanglongxia/openthread/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhanglongxia/openthread/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhanglongxia/openthread/teams","hooks_url":"https://api.github.com/repos/zhanglongxia/openthread/hooks","issue_events_url":"https://api.github.com/repos/zhanglongxia/openthread/issues/events{/number}","events_url":"https://api.github.com/repos/zhanglongxia/openthread/events","assignees_url":"https://api.github.com/repos/zhanglongxia/openthread/assignees{/user}","branches_url":"https://api.github.com/repos/zhanglongxia/openthread/branches{/branch}","tags_url":"https://api.github.com/repos/zhanglongxia/openthread/tags","blobs_url":"https://api.github.com/repos/zhanglongxia/openthread/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhanglongxia/openthread/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhanglongxia/openthread/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhanglongxia/openthread/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhanglongxia/openthread/statuses/{sha}","languages_url":"https://api.github.com/repos/zhanglongxia/openthread/languages","stargazers_url":"https://api.github.com/repos/zhanglongxia/openthread/stargazers","contributors_url":"https://api.github.com/repos/zhanglongxia/openthread/contributors","subscribers_url":"https://api.github.com/repos/zhanglongxia/openthread/subscribers","subscription_url":"https://api.github.com/repos/zhanglongxia/openthread/subscription","commits_url":"https://api.github.com/repos/zhanglongxia/openthread/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhanglongxia/openthread/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhanglongxia/openthread/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhanglongxia/openthread/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhanglongxia/openthread/contents/{+path}","compare_url":"https://api.github.com/repos/zhanglongxia/openthread/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhanglongxia/openthread/merges","archive_url":"https://api.github.com/repos/zhanglongxia/openthread/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhanglongxia/openthread/downloads","issues_url":"https://api.github.com/repos/zhanglongxia/openthread/issues{/number}","pulls_url":"https://api.github.com/repos/zhanglongxia/openthread/pulls{/number}","milestones_url":"https://api.github.com/repos/zhanglongxia/openthread/milestones{/number}","notifications_url":"https://api.github.com/repos/zhanglongxia/openthread/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhanglongxia/openthread/labels{/name}","releases_url":"https://api.github.com/repos/zhanglongxia/openthread/releases{/id}","deployments_url":"https://api.github.com/repos/zhanglongxia/openthread/deployments","created_at":"2017-12-14T03:08:48Z","updated_at":"2018-09-17T03:38:17Z","pushed_at":"2018-09-18T11:01:57Z","git_url":"git://github.com/zhanglongxia/openthread.git","ssh_url":"git@github.com:zhanglongxia/openthread.git","clone_url":"https://github.com/zhanglongxia/openthread.git","svn_url":"https://github.com/zhanglongxia/openthread","homepage":"","size":53264,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openthread:master","ref":"master","sha":"11014739f2d7098d3c14fec16a8634854eeb851a","user":{"login":"openthread","id":16142269,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTQyMjY5","avatar_url":"https://avatars2.githubusercontent.com/u/16142269?v=4","gravatar_id":"","url":"https://api.github.com/users/openthread","html_url":"https://github.com/openthread","followers_url":"https://api.github.com/users/openthread/followers","following_url":"https://api.github.com/users/openthread/following{/other_user}","gists_url":"https://api.github.com/users/openthread/gists{/gist_id}","starred_url":"https://api.github.com/users/openthread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openthread/subscriptions","organizations_url":"https://api.github.com/users/openthread/orgs","repos_url":"https://api.github.com/users/openthread/repos","events_url":"https://api.github.com/users/openthread/events{/privacy}","received_events_url":"https://api.github.com/users/openthread/received_events","type":"Organization","site_admin":false},"repo":{"id":55808787,"node_id":"MDEwOlJlcG9zaXRvcnk1NTgwODc4Nw==","name":"openthread","full_name":"openthread/openthread","private":false,"owner":{"login":"openthread","id":16142269,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MTQyMjY5","avatar_url":"https://avatars2.githubusercontent.com/u/16142269?v=4","gravatar_id":"","url":"https://api.github.com/users/openthread","html_url":"https://github.com/openthread","followers_url":"https://api.github.com/users/openthread/followers","following_url":"https://api.github.com/users/openthread/following{/other_user}","gists_url":"https://api.github.com/users/openthread/gists{/gist_id}","starred_url":"https://api.github.com/users/openthread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openthread/subscriptions","organizations_url":"https://api.github.com/users/openthread/orgs","repos_url":"https://api.github.com/users/openthread/repos","events_url":"https://api.github.com/users/openthread/events{/privacy}","received_events_url":"https://api.github.com/users/openthread/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openthread/openthread","description":"OpenThread released by Nest is an open-source implementation of the Thread networking protocol","fork":false,"url":"https://api.github.com/repos/openthread/openthread","forks_url":"https://api.github.com/repos/openthread/openthread/forks","keys_url":"https://api.github.com/repos/openthread/openthread/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openthread/openthread/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openthread/openthread/teams","hooks_url":"https://api.github.com/repos/openthread/openthread/hooks","issue_events_url":"https://api.github.com/repos/openthread/openthread/issues/events{/number}","events_url":"https://api.github.com/repos/openthread/openthread/events","assignees_url":"https://api.github.com/repos/openthread/openthread/assignees{/user}","branches_url":"https://api.github.com/repos/openthread/openthread/branches{/branch}","tags_url":"https://api.github.com/repos/openthread/openthread/tags","blobs_url":"https://api.github.com/repos/openthread/openthread/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openthread/openthread/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openthread/openthread/git/refs{/sha}","trees_url":"https://api.github.com/repos/openthread/openthread/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openthread/openthread/statuses/{sha}","languages_url":"https://api.github.com/repos/openthread/openthread/languages","stargazers_url":"https://api.github.com/repos/openthread/openthread/stargazers","contributors_url":"https://api.github.com/repos/openthread/openthread/contributors","subscribers_url":"https://api.github.com/repos/openthread/openthread/subscribers","subscription_url":"https://api.github.com/repos/openthread/openthread/subscription","commits_url":"https://api.github.com/repos/openthread/openthread/commits{/sha}","git_commits_url":"https://api.github.com/repos/openthread/openthread/git/commits{/sha}","comments_url":"https://api.github.com/repos/openthread/openthread/comments{/number}","issue_comment_url":"https://api.github.com/repos/openthread/openthread/issues/comments{/number}","contents_url":"https://api.github.com/repos/openthread/openthread/contents/{+path}","compare_url":"https://api.github.com/repos/openthread/openthread/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openthread/openthread/merges","archive_url":"https://api.github.com/repos/openthread/openthread/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openthread/openthread/downloads","issues_url":"https://api.github.com/repos/openthread/openthread/issues{/number}","pulls_url":"https://api.github.com/repos/openthread/openthread/pulls{/number}","milestones_url":"https://api.github.com/repos/openthread/openthread/milestones{/number}","notifications_url":"https://api.github.com/repos/openthread/openthread/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openthread/openthread/labels{/name}","releases_url":"https://api.github.com/repos/openthread/openthread/releases{/id}","deployments_url":"https://api.github.com/repos/openthread/openthread/deployments","created_at":"2016-04-08T20:47:41Z","updated_at":"2018-09-17T23:41:33Z","pushed_at":"2018-09-18T11:29:11Z","git_url":"git://github.com/openthread/openthread.git","ssh_url":"git@github.com:openthread/openthread.git","clone_url":"https://github.com/openthread/openthread.git","svn_url":"https://github.com/openthread/openthread","homepage":"","size":53011,"stargazers_count":1656,"watchers_count":1656,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":487,"mirror_url":null,"archived":false,"open_issues_count":49,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":487,"open_issues":49,"watchers":1656,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3013"},"html":{"href":"https://github.com/openthread/openthread/pull/3013"},"issue":{"href":"https://api.github.com/repos/openthread/openthread/issues/3013"},"comments":{"href":"https://api.github.com/repos/openthread/openthread/issues/3013/comments"},"review_comments":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3013/comments"},"review_comment":{"href":"https://api.github.com/repos/openthread/openthread/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openthread/openthread/pulls/3013/commits"},"statuses":{"href":"https://api.github.com/repos/openthread/openthread/statuses/970b5decd17b9bc686325428be4d2fc6b38d5e06"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"librasungirl"}}