From 84f6d917aa6f67a11e4c732f6ed178d876c62d9e Mon Sep 17 00:00:00 2001 From: godofredoc <54371434+godofredoc@users.noreply.github.com> Date: Tue, 17 Dec 2019 14:58:45 -0800 Subject: [PATCH] Revert "Run presubmit tests for cocoon and engine automatically on luci. (#572)" This reverts commit 1a926c672f39d32903d7d5cdf75ba83a4dc9164c. --- .../src/request_handlers/github_webhook.dart | 22 +- .../request_handlers/github_webhook_test.dart | 386 ++++++++---------- 2 files changed, 169 insertions(+), 239 deletions(-) diff --git a/app_dart/lib/src/request_handlers/github_webhook.dart b/app_dart/lib/src/request_handlers/github_webhook.dart index 44ee6cbdde..841e2e3899 100644 --- a/app_dart/lib/src/request_handlers/github_webhook.dart +++ b/app_dart/lib/src/request_handlers/github_webhook.dart @@ -18,12 +18,6 @@ import '../request_handling/exceptions.dart'; import '../request_handling/request_handler.dart'; import '../service/buildbucket.dart'; -/// List of Github supported repos. -const Set supportedRepos = {'engine', 'flutter', 'cocoon'}; - -/// List of repos that require CQ+1 label. -const Set needsCQLabelList = {'flutter/flutter'}; - @immutable class GithubWebhook extends RequestHandler { GithubWebhook(Config config, this.buildBucketClient, {HttpClient skiaClient}) @@ -102,10 +96,6 @@ class GithubWebhook extends RequestHandler { ); break; case 'unlabeled': - if (!needsCQLabelList - .contains(event.repository.fullName.toLowerCase())) { - break; - } if (!await _checkForCqLabel(existingLabels)) { await _cancelLuci( event.repository.name, @@ -141,14 +131,8 @@ class GithubWebhook extends RequestHandler { } // The mergeable flag may be null. False indicates there's a merge conflict, // null indicates unknown. Err on the side of allowing the job to run. - - // For flutter/flutter tests need to be optimized before enforcing CQ. - bool runCQ = true; - if (needsCQLabelList.contains(event.repository.fullName.toLowerCase())) { - runCQ = await _checkForCqLabel(labels); - } - - if (runCQ) { + if (event.pullRequest.mergeable != false && + await _checkForCqLabel(labels)) { await _scheduleLuci( number: event.number, sha: event.pullRequest.head.sha, @@ -216,7 +200,7 @@ class GithubWebhook extends RequestHandler { assert(sha != null); assert(repositoryName != null); assert(skipRunningCheck != null); - if (!supportedRepos.contains(repositoryName)) { + if (repositoryName != 'flutter' && repositoryName != 'engine') { log.error('Unsupported repo on webhook: $repositoryName'); throw BadRequestException( 'Repository $repositoryName is not supported by this service.'); diff --git a/app_dart/test/request_handlers/github_webhook_test.dart b/app_dart/test/request_handlers/github_webhook_test.dart index 6c6e2c5812..b5150ab14b 100644 --- a/app_dart/test/request_handlers/github_webhook_test.dart +++ b/app_dart/test/request_handlers/github_webhook_test.dart @@ -688,7 +688,6 @@ void main() { config.deviceLabServiceAccountValue = const ServiceAccountInfo(email: serviceAccountEmail); config.luciTryBuildersValue = json.decode('''[ - {"name": "Cocoon", "repo": "cocoon"}, {"name": "Linux", "repo": "flutter", "taskName": "linux_bot"}, {"name": "Mac", "repo": "flutter", "taskName": "mac_bot"}, {"name": "Windows", "repo": "flutter", "taskName": "windows_bot"}, @@ -707,8 +706,7 @@ void main() { request.headers.set('X-GitHub-Event', 'pull_request'); }); - test('Optional repo - Not schedule build when labeled without CQ', - () async { + test('Not schedule build when lableed without CQ', () async { when(issuesService.listLabelsByIssue(any, issueNumber)).thenAnswer((_) { return Stream.fromIterable([ IssueLabel()..name = 'Random Label', @@ -727,60 +725,6 @@ void main() { verifyNever(mockBuildBucketClient.batch(any)); }); - test('Mandatory repo - Always schedule CQ', () async { - when(issuesService.listLabelsByIssue(any, issueNumber)).thenAnswer((_) { - return Stream.fromIterable([ - IssueLabel()..name = 'Random Label', - ]); - }); - - when(mockBuildBucketClient.batch(any)).thenAnswer((_) async { - return const BatchResponse( - responses: [ - Response( - searchBuilds: SearchBuildsResponse( - builds: [], - ), - ), - Response( - searchBuilds: SearchBuildsResponse( - builds: [], - ), - ), - ], - ); - }); - - request.body = jsonTemplate('labeled', issueNumber, 'master', - repoFullName: 'flutter/cocoon', repoName: 'cocoon'); - final Uint8List body = utf8.encode(request.body); - final Uint8List key = utf8.encode(keyString); - final String hmac = getHmac(body, key); - request.headers.set('X-Hub-Signature', 'sha1=$hmac'); - - await tester.post(webhook); - expect( - json.encode( - verify(mockBuildBucketClient.batch(captureAny)).captured), - '[{"requests":[{"searchBuilds":{"predicate":{"builder":{"project":' - '"flutter","bucket":"try"},"createdBy":"test@test","tags":[{"key":' - '"buildset","value":"pr/git/123"},{"key":"github_link","value":' - '"https://github.com/flutter/cocoon/pull/123"},{"key":"user_agent",' - '"value":"flutter-cocoon"}]}}},{"searchBuilds":{"predicate":' - '{"builder":{"project":"flutter","bucket":"try"},"tags":[{"key":' - '"buildset","value":"pr/git/123"},{"key":"user_agent","value":' - '"recipe"}]}}}]},{"requests":[{"scheduleBuild":{"builder":' - '{"project":"flutter","bucket":"try","builder":"Cocoon"},' - '"properties":{"git_url":"https://github.com/flutter/cocoon",' - '"git_ref":"refs/pull/123/head"},"tags":[{"key":"buildset",' - '"value":"pr/git/123"},{"key":"buildset","value":' - '"sha/git/be6ff099a4ee56e152a5fa2f37edd10f79d1269a"},' - '{"key":"user_agent","value":"flutter-cocoon"},{"key":"github_link",' - '"value":"https://github.com/flutter/cocoon/pull/123"}],"notify":' - '{"pubsubTopic":"projects/flutter-dashboard/topics/luci-builds",' - '"userData":"eyJyZXRyaWVzIjowfQ=="}}}]}]'); - }); - test('Schedules builds when labeled', () async { when(mockBuildBucketClient.batch(any)).thenAnswer((_) async { return const BatchResponse( @@ -1057,25 +1001,27 @@ String skiaIgnoreTemplate({String pullRequestNumber = '0000'}) { '''; } -String jsonTemplate(String action, int number, String baseRef, - {String login = 'flutter', - bool includeCqLabel = false, - bool includeGoldLabel = false, - bool isDraft = false, - bool merged = false, - String repoFullName = 'flutter/flutter', - String repoName = 'flutter'}) => +String jsonTemplate( + String action, + int number, + String baseRef, { + String login = 'flutter', + bool includeCqLabel = false, + bool includeGoldLabel = false, + bool isDraft = false, + bool merged = false, +}) => '''{ "action": "$action", "number": $number, "pull_request": { - "url": "https://api.github.com/repos/$repoFullName/pulls/$number", + "url": "https://api.github.com/repos/flutter/flutter/pulls/$number", "id": 294034, "node_id": "MDExOlB1bGxSZXF1ZXN0Mjk0MDMzODQx", - "html_url": "https://github.com/$repoFullName/pull/$number", - "diff_url": "https://github.com/$repoFullName/pull/$number.diff", - "patch_url": "https://github.com/$repoFullName/pull/$number.patch", - "issue_url": "https://api.github.com/repos/$repoFullName/issues/$number", + "html_url": "https://github.com/flutter/flutter/pull/$number", + "diff_url": "https://github.com/flutter/flutter/pull/$number.diff", + "patch_url": "https://github.com/flutter/flutter/pull/$number.patch", + "issue_url": "https://api.github.com/repos/flutter/flutter/issues/$number", "number": $number, "state": "open", "locked": false, @@ -1115,7 +1061,7 @@ String jsonTemplate(String action, int number, String baseRef, { "id": 487496476, "node_id": "MDU6TGFiZWw0ODc0OTY0NzY=", - "url": "https://api.github.com/repos/$repoFullName/labels/cla:%20yes", + "url": "https://api.github.com/repos/flutter/flutter/labels/cla:%20yes", "name": "cla: yes", "color": "ffffff", "default": false @@ -1123,7 +1069,7 @@ String jsonTemplate(String action, int number, String baseRef, { "id": 284437560, "node_id": "MDU6TGFiZWwyODQ0Mzc1NjA=", - "url": "https://api.github.com/repos/$repoFullName/labels/framework", + "url": "https://api.github.com/repos/flutter/flutter/labels/framework", "name": "framework", "color": "207de5", "default": false @@ -1132,7 +1078,7 @@ String jsonTemplate(String action, int number, String baseRef, { "id": 283480100, "node_id": "MDU6TGFiZWwyODM0ODAxMDA=", - "url": "https://api.github.com/repos/$repoFullName/labels/tool", + "url": "https://api.github.com/repos/flutter/flutter/labels/tool", "name": "will affect goldens", "color": "5319e7", "default": false @@ -1141,7 +1087,7 @@ String jsonTemplate(String action, int number, String baseRef, { "id": 283480100, "node_id": "MDU6TGFiZWwyODM0ODAxMDA=", - "url": "https://api.github.com/repos/$repoFullName/labels/tool", + "url": "https://api.github.com/repos/flutter/flutter/labels/tool", "name": "CQ+1", "color": "5319e7", "default": false @@ -1149,18 +1095,18 @@ String jsonTemplate(String action, int number, String baseRef, { "id": 283480100, "node_id": "MDU6TGFiZWwyODM0ODAxMDA=", - "url": "https://api.github.com/repos/$repoFullName/labels/tool", + "url": "https://api.github.com/repos/flutter/flutter/labels/tool", "name": "tool", "color": "5319e7", "default": false } ], "milestone": null, - "commits_url": "https://api.github.com/repos/$repoFullName/pulls/$number/commits", - "review_comments_url": "https://api.github.com/repos/$repoFullName/pulls/$number/comments", - "review_comment_url": "https://api.github.com/repos/$repoFullName/pulls/comments{/number}", - "comments_url": "https://api.github.com/repos/$repoFullName/issues/$number/comments", - "statuses_url": "https://api.github.com/repos/$repoFullName/statuses/be6ff099a4ee56e152a5fa2f37edd10f79d1269a", + "commits_url": "https://api.github.com/repos/flutter/flutter/pulls/$number/commits", + "review_comments_url": "https://api.github.com/repos/flutter/flutter/pulls/$number/comments", + "review_comment_url": "https://api.github.com/repos/flutter/flutter/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/flutter/flutter/issues/$number/comments", + "statuses_url": "https://api.github.com/repos/flutter/flutter/statuses/be6ff099a4ee56e152a5fa2f37edd10f79d1269a", "head": { "label": "$login:wait_for_reassemble", "ref": "wait_for_reassemble", @@ -1188,8 +1134,8 @@ String jsonTemplate(String action, int number, String baseRef, "repo": { "id": 131232406, "node_id": "MDEwOlJlcG9zaXRvcnkxMzEyMzI0MDY=", - "name": "$repoName", - "full_name": "$repoFullName", + "name": "flutter", + "full_name": "flutter/flutter", "private": false, "owner": { "login": "flutter", @@ -1211,53 +1157,53 @@ String jsonTemplate(String action, int number, String baseRef, "type": "User", "site_admin": false }, - "html_url": "https://github.com/$repoFullName", + "html_url": "https://github.com/flutter/flutter", "description": "Flutter makes it easy and fast to build beautiful mobile apps.", "fork": true, - "url": "https://api.github.com/repos/$repoFullName", - "forks_url": "https://api.github.com/repos/$repoFullName/forks", - "keys_url": "https://api.github.com/repos/$repoFullName/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/$repoFullName/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/$repoFullName/teams", - "hooks_url": "https://api.github.com/repos/$repoFullName/hooks", - "issue_events_url": "https://api.github.com/repos/$repoFullName/issues/events{/number}", - "events_url": "https://api.github.com/repos/$repoFullName/events", - "assignees_url": "https://api.github.com/repos/$repoFullName/assignees{/user}", - "branches_url": "https://api.github.com/repos/$repoFullName/branches{/branch}", - "tags_url": "https://api.github.com/repos/$repoFullName/tags", - "blobs_url": "https://api.github.com/repos/$repoFullName/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/$repoFullName/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/$repoFullName/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/$repoFullName/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/$repoFullName/statuses/{sha}", - "languages_url": "https://api.github.com/repos/$repoFullName/languages", - "stargazers_url": "https://api.github.com/repos/$repoFullName/stargazers", - "contributors_url": "https://api.github.com/repos/$repoFullName/contributors", - "subscribers_url": "https://api.github.com/repos/$repoFullName/subscribers", - "subscription_url": "https://api.github.com/repos/$repoFullName/subscription", - "commits_url": "https://api.github.com/repos/$repoFullName/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/$repoFullName/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/$repoFullName/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/$repoFullName/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/$repoFullName/contents/{+path}", - "compare_url": "https://api.github.com/repos/$repoFullName/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/$repoFullName/merges", - "archive_url": "https://api.github.com/repos/$repoFullName/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/$repoFullName/downloads", - "issues_url": "https://api.github.com/repos/$repoFullName/issues{/number}", - "pulls_url": "https://api.github.com/repos/$repoFullName/pulls{/number}", - "milestones_url": "https://api.github.com/repos/$repoFullName/milestones{/number}", - "notifications_url": "https://api.github.com/repos/$repoFullName/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/$repoFullName/labels{/name}", - "releases_url": "https://api.github.com/repos/$repoFullName/releases{/id}", - "deployments_url": "https://api.github.com/repos/$repoFullName/deployments", + "url": "https://api.github.com/repos/flutter/flutter", + "forks_url": "https://api.github.com/repos/flutter/flutter/forks", + "keys_url": "https://api.github.com/repos/flutter/flutter/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/flutter/flutter/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/flutter/flutter/teams", + "hooks_url": "https://api.github.com/repos/flutter/flutter/hooks", + "issue_events_url": "https://api.github.com/repos/flutter/flutter/issues/events{/number}", + "events_url": "https://api.github.com/repos/flutter/flutter/events", + "assignees_url": "https://api.github.com/repos/flutter/flutter/assignees{/user}", + "branches_url": "https://api.github.com/repos/flutter/flutter/branches{/branch}", + "tags_url": "https://api.github.com/repos/flutter/flutter/tags", + "blobs_url": "https://api.github.com/repos/flutter/flutter/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/flutter/flutter/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/flutter/flutter/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/flutter/flutter/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/flutter/flutter/statuses/{sha}", + "languages_url": "https://api.github.com/repos/flutter/flutter/languages", + "stargazers_url": "https://api.github.com/repos/flutter/flutter/stargazers", + "contributors_url": "https://api.github.com/repos/flutter/flutter/contributors", + "subscribers_url": "https://api.github.com/repos/flutter/flutter/subscribers", + "subscription_url": "https://api.github.com/repos/flutter/flutter/subscription", + "commits_url": "https://api.github.com/repos/flutter/flutter/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/flutter/flutter/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/flutter/flutter/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/flutter/flutter/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/flutter/flutter/contents/{+path}", + "compare_url": "https://api.github.com/repos/flutter/flutter/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/flutter/flutter/merges", + "archive_url": "https://api.github.com/repos/flutter/flutter/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/flutter/flutter/downloads", + "issues_url": "https://api.github.com/repos/flutter/flutter/issues{/number}", + "pulls_url": "https://api.github.com/repos/flutter/flutter/pulls{/number}", + "milestones_url": "https://api.github.com/repos/flutter/flutter/milestones{/number}", + "notifications_url": "https://api.github.com/repos/flutter/flutter/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/flutter/flutter/labels{/name}", + "releases_url": "https://api.github.com/repos/flutter/flutter/releases{/id}", + "deployments_url": "https://api.github.com/repos/flutter/flutter/deployments", "created_at": "2018-04-27T02:03:08Z", "updated_at": "2019-06-27T06:56:59Z", "pushed_at": "2019-07-03T19:40:11Z", - "git_url": "git://github.com/$repoFullName.git", - "ssh_url": "git@github.com:$repoFullName.git", - "clone_url": "https://github.com/$repoFullName.git", - "svn_url": "https://github.com/$repoFullName", + "git_url": "git://github.com/flutter/flutter.git", + "ssh_url": "git@github.com:flutter/flutter.git", + "clone_url": "https://github.com/flutter/flutter.git", + "svn_url": "https://github.com/flutter/flutter", "homepage": "https://flutter.io", "size": 94508, "stargazers_count": 1, @@ -1313,8 +1259,8 @@ String jsonTemplate(String action, int number, String baseRef, "repo": { "id": 31792824, "node_id": "MDEwOlJlcG9zaXRvcnkzMTc5MjgyNA==", - "name": "$repoName", - "full_name": "$repoFullName", + "name": "flutter", + "full_name": "flutter/flutter", "private": false, "owner": { "login": "flutter", @@ -1336,53 +1282,53 @@ String jsonTemplate(String action, int number, String baseRef, "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/$repoFullName", + "html_url": "https://github.com/flutter/flutter", "description": "Flutter makes it easy and fast to build beautiful mobile apps.", "fork": false, - "url": "https://api.github.com/repos/$repoFullName", - "forks_url": "https://api.github.com/repos/$repoFullName/forks", - "keys_url": "https://api.github.com/repos/$repoFullName/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/$repoFullName/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/$repoFullName/teams", - "hooks_url": "https://api.github.com/repos/$repoFullName/hooks", - "issue_events_url": "https://api.github.com/repos/$repoFullName/issues/events{/number}", - "events_url": "https://api.github.com/repos/$repoFullName/events", - "assignees_url": "https://api.github.com/repos/$repoFullName/assignees{/user}", - "branches_url": "https://api.github.com/repos/$repoFullName/branches{/branch}", - "tags_url": "https://api.github.com/repos/$repoFullName/tags", - "blobs_url": "https://api.github.com/repos/$repoFullName/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/$repoFullName/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/$repoFullName/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/$repoFullName/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/$repoFullName/statuses/{sha}", - "languages_url": "https://api.github.com/repos/$repoFullName/languages", - "stargazers_url": "https://api.github.com/repos/$repoFullName/stargazers", - "contributors_url": "https://api.github.com/repos/$repoFullName/contributors", - "subscribers_url": "https://api.github.com/repos/$repoFullName/subscribers", - "subscription_url": "https://api.github.com/repos/$repoFullName/subscription", - "commits_url": "https://api.github.com/repos/$repoFullName/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/$repoFullName/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/$repoFullName/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/$repoFullName/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/$repoFullName/contents/{+path}", - "compare_url": "https://api.github.com/repos/$repoFullName/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/$repoFullName/merges", - "archive_url": "https://api.github.com/repos/$repoFullName/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/$repoFullName/downloads", - "issues_url": "https://api.github.com/repos/$repoFullName/issues{/number}", - "pulls_url": "https://api.github.com/repos/$repoFullName/pulls{/number}", - "milestones_url": "https://api.github.com/repos/$repoFullName/milestones{/number}", - "notifications_url": "https://api.github.com/repos/$repoFullName/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/$repoFullName/labels{/name}", - "releases_url": "https://api.github.com/repos/$repoFullName/releases{/id}", - "deployments_url": "https://api.github.com/repos/$repoFullName/deployments", + "url": "https://api.github.com/repos/flutter/flutter", + "forks_url": "https://api.github.com/repos/flutter/flutter/forks", + "keys_url": "https://api.github.com/repos/flutter/flutter/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/flutter/flutter/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/flutter/flutter/teams", + "hooks_url": "https://api.github.com/repos/flutter/flutter/hooks", + "issue_events_url": "https://api.github.com/repos/flutter/flutter/issues/events{/number}", + "events_url": "https://api.github.com/repos/flutter/flutter/events", + "assignees_url": "https://api.github.com/repos/flutter/flutter/assignees{/user}", + "branches_url": "https://api.github.com/repos/flutter/flutter/branches{/branch}", + "tags_url": "https://api.github.com/repos/flutter/flutter/tags", + "blobs_url": "https://api.github.com/repos/flutter/flutter/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/flutter/flutter/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/flutter/flutter/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/flutter/flutter/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/flutter/flutter/statuses/{sha}", + "languages_url": "https://api.github.com/repos/flutter/flutter/languages", + "stargazers_url": "https://api.github.com/repos/flutter/flutter/stargazers", + "contributors_url": "https://api.github.com/repos/flutter/flutter/contributors", + "subscribers_url": "https://api.github.com/repos/flutter/flutter/subscribers", + "subscription_url": "https://api.github.com/repos/flutter/flutter/subscription", + "commits_url": "https://api.github.com/repos/flutter/flutter/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/flutter/flutter/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/flutter/flutter/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/flutter/flutter/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/flutter/flutter/contents/{+path}", + "compare_url": "https://api.github.com/repos/flutter/flutter/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/flutter/flutter/merges", + "archive_url": "https://api.github.com/repos/flutter/flutter/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/flutter/flutter/downloads", + "issues_url": "https://api.github.com/repos/flutter/flutter/issues{/number}", + "pulls_url": "https://api.github.com/repos/flutter/flutter/pulls{/number}", + "milestones_url": "https://api.github.com/repos/flutter/flutter/milestones{/number}", + "notifications_url": "https://api.github.com/repos/flutter/flutter/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/flutter/flutter/labels{/name}", + "releases_url": "https://api.github.com/repos/flutter/flutter/releases{/id}", + "deployments_url": "https://api.github.com/repos/flutter/flutter/deployments", "created_at": "2015-03-06T22:54:58Z", "updated_at": "2019-07-04T02:08:44Z", "pushed_at": "2019-07-04T02:03:04Z", - "git_url": "git://github.com/$repoFullName.git", - "ssh_url": "git@github.com:$repoFullName.git", - "clone_url": "https://github.com/$repoFullName.git", - "svn_url": "https://github.com/$repoFullName", + "git_url": "git://github.com/flutter/flutter.git", + "ssh_url": "git@github.com:flutter/flutter.git", + "clone_url": "https://github.com/flutter/flutter.git", + "svn_url": "https://github.com/flutter/flutter", "homepage": "https://flutter.dev", "size": 65507, "stargazers_count": 68944, @@ -1413,28 +1359,28 @@ String jsonTemplate(String action, int number, String baseRef, }, "_links": { "self": { - "href": "https://api.github.com/repos/$repoFullName/pulls/$number" + "href": "https://api.github.com/repos/flutter/flutter/pulls/$number" }, "html": { - "href": "https://github.com/$repoFullName/pull/$number" + "href": "https://github.com/flutter/flutter/pull/$number" }, "issue": { - "href": "https://api.github.com/repos/$repoFullName/issues/$number" + "href": "https://api.github.com/repos/flutter/flutter/issues/$number" }, "comments": { - "href": "https://api.github.com/repos/$repoFullName/issues/$number/comments" + "href": "https://api.github.com/repos/flutter/flutter/issues/$number/comments" }, "review_comments": { - "href": "https://api.github.com/repos/$repoFullName/pulls/$number/comments" + "href": "https://api.github.com/repos/flutter/flutter/pulls/$number/comments" }, "review_comment": { - "href": "https://api.github.com/repos/$repoFullName/pulls/comments{/number}" + "href": "https://api.github.com/repos/flutter/flutter/pulls/comments{/number}" }, "commits": { - "href": "https://api.github.com/repos/$repoFullName/pulls/$number/commits" + "href": "https://api.github.com/repos/flutter/flutter/pulls/$number/commits" }, "statuses": { - "href": "https://api.github.com/repos/$repoFullName/statuses/deadbeef" + "href": "https://api.github.com/repos/flutter/flutter/statuses/deadbeef" } }, "author_association": "MEMBER", @@ -1455,8 +1401,8 @@ String jsonTemplate(String action, int number, String baseRef, "repository": { "id": 1868532, "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", - "name": "$repoName", - "full_name": "$repoFullName", + "name": "flutter", + "full_name": "flutter/flutter", "private": false, "owner": { "login": "flutter", @@ -1478,53 +1424,53 @@ String jsonTemplate(String action, int number, String baseRef, "type": "User", "site_admin": false }, - "html_url": "https://github.com/$repoFullName", + "html_url": "https://github.com/flutter/flutter", "description": null, "fork": false, - "url": "https://api.github.com/repos/$repoFullName", - "forks_url": "https://api.github.com/repos/$repoFullName/forks", - "keys_url": "https://api.github.com/repos/$repoFullName/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/$repoFullName/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/$repoFullName/teams", - "hooks_url": "https://api.github.com/repos/$repoFullName/hooks", - "issue_events_url": "https://api.github.com/repos/$repoFullName/issues/events{/number}", - "events_url": "https://api.github.com/repos/$repoFullName/events", - "assignees_url": "https://api.github.com/repos/$repoFullName/assignees{/user}", - "branches_url": "https://api.github.com/repos/$repoFullName/branches{/branch}", - "tags_url": "https://api.github.com/repos/$repoFullName/tags", - "blobs_url": "https://api.github.com/repos/$repoFullName/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/$repoFullName/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/$repoFullName/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/$repoFullName/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/$repoFullName/statuses/{sha}", - "languages_url": "https://api.github.com/repos/$repoFullName/languages", - "stargazers_url": "https://api.github.com/repos/$repoFullName/stargazers", - "contributors_url": "https://api.github.com/repos/$repoFullName/contributors", - "subscribers_url": "https://api.github.com/repos/$repoFullName/subscribers", - "subscription_url": "https://api.github.com/repos/$repoFullName/subscription", - "commits_url": "https://api.github.com/repos/$repoFullName/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/$repoFullName/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/$repoFullName/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/$repoFullName/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/$repoFullName/contents/{+path}", - "compare_url": "https://api.github.com/repos/$repoFullName/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/$repoFullName/merges", - "archive_url": "https://api.github.com/repos/$repoFullName/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/$repoFullName/downloads", - "issues_url": "https://api.github.com/repos/$repoFullName/issues{/number}", - "pulls_url": "https://api.github.com/repos/$repoFullName/pulls{/number}", - "milestones_url": "https://api.github.com/repos/$repoFullName/milestones{/number}", - "notifications_url": "https://api.github.com/repos/$repoFullName/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/$repoFullName/labels{/name}", - "releases_url": "https://api.github.com/repos/$repoFullName/releases{/id}", - "deployments_url": "https://api.github.com/repos/$repoFullName/deployments", + "url": "https://api.github.com/repos/flutter/flutter", + "forks_url": "https://api.github.com/repos/flutter/flutter/forks", + "keys_url": "https://api.github.com/repos/flutter/flutter/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/flutter/flutter/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/flutter/flutter/teams", + "hooks_url": "https://api.github.com/repos/flutter/flutter/hooks", + "issue_events_url": "https://api.github.com/repos/flutter/flutter/issues/events{/number}", + "events_url": "https://api.github.com/repos/flutter/flutter/events", + "assignees_url": "https://api.github.com/repos/flutter/flutter/assignees{/user}", + "branches_url": "https://api.github.com/repos/flutter/flutter/branches{/branch}", + "tags_url": "https://api.github.com/repos/flutter/flutter/tags", + "blobs_url": "https://api.github.com/repos/flutter/flutter/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/flutter/flutter/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/flutter/flutter/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/flutter/flutter/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/flutter/flutter/statuses/{sha}", + "languages_url": "https://api.github.com/repos/flutter/flutter/languages", + "stargazers_url": "https://api.github.com/repos/flutter/flutter/stargazers", + "contributors_url": "https://api.github.com/repos/flutter/flutter/contributors", + "subscribers_url": "https://api.github.com/repos/flutter/flutter/subscribers", + "subscription_url": "https://api.github.com/repos/flutter/flutter/subscription", + "commits_url": "https://api.github.com/repos/flutter/flutter/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/flutter/flutter/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/flutter/flutter/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/flutter/flutter/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/flutter/flutter/contents/{+path}", + "compare_url": "https://api.github.com/repos/flutter/flutter/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/flutter/flutter/merges", + "archive_url": "https://api.github.com/repos/flutter/flutter/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/flutter/flutter/downloads", + "issues_url": "https://api.github.com/repos/flutter/flutter/issues{/number}", + "pulls_url": "https://api.github.com/repos/flutter/flutter/pulls{/number}", + "milestones_url": "https://api.github.com/repos/flutter/flutter/milestones{/number}", + "notifications_url": "https://api.github.com/repos/flutter/flutter/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/flutter/flutter/labels{/name}", + "releases_url": "https://api.github.com/repos/flutter/flutter/releases{/id}", + "deployments_url": "https://api.github.com/repos/flutter/flutter/deployments", "created_at": "2019-05-15T15:19:25Z", "updated_at": "2019-05-15T15:19:27Z", "pushed_at": "2019-05-15T15:20:32Z", - "git_url": "git://github.com/$repoFullName.git", - "ssh_url": "git@github.com:$repoFullName.git", - "clone_url": "https://github.com/$repoFullName.git", - "svn_url": "https://github.com/$repoFullName", + "git_url": "git://github.com/flutter/flutter.git", + "ssh_url": "git@github.com:flutter/flutter.git", + "clone_url": "https://github.com/flutter/flutter.git", + "svn_url": "https://github.com/flutter/flutter", "homepage": null, "size": 0, "stargazers_count": 0,