From fb15beee8f757d156b5b635d810606de427695d8 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Thu, 27 May 2021 15:38:12 +0000 Subject: [PATCH 1/3] Refactor out the list of projects which use Bugzilla --- source/dlangbot/bugzilla.d | 5 +++++ source/dlangbot/github.d | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/dlangbot/bugzilla.d b/source/dlangbot/bugzilla.d index 8543fa5..c2061dc 100644 --- a/source/dlangbot/bugzilla.d +++ b/source/dlangbot/bugzilla.d @@ -5,6 +5,11 @@ import vibe.inet.webform : urlEncode; shared string bugzillaURL = "https://issues.dlang.org"; +// D projects which use Bugzilla for bug tracking. +static immutable bugzillaProjectSlugs = ["dlang/dmd", "dlang/druntime", "dlang/phobos", + "dlang/dlang.org", "dlang/tools", "dlang/installer"]; + + import std.algorithm, std.conv, std.range, std.string; import std.exception : enforce; import std.format : format; diff --git a/source/dlangbot/github.d b/source/dlangbot/github.d index 1ade915..8825297 100644 --- a/source/dlangbot/github.d +++ b/source/dlangbot/github.d @@ -1,6 +1,6 @@ module dlangbot.github; -import dlangbot.bugzilla : bugzillaURL, Issue, IssueRef; +import dlangbot.bugzilla : bugzillaURL, bugzillaProjectSlugs, Issue, IssueRef; import dlangbot.warnings : printMessages, UserMessage; import std.algorithm, std.range; @@ -88,11 +88,8 @@ If you have addressed all reviews or aren't sure how to proceed, don't hesitate pr.user.login, pr.repoSlug); } - static immutable bugzillaReferences = ["dlang/dmd", "dlang/druntime", "dlang/phobos", - "dlang/dlang.org", "dlang/tools", "dlang/installer"]; - // markdown doesn't support breaking of long lines - if (bugzillaReferences.canFind(pr.repoSlug)) + if (bugzillaProjectSlugs.canFind(pr.repoSlug)) { app ~= "\n### Bugzilla references\n\n"; if (refs.length) From b0c62154213b798a8741869eb354238609d170e3 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Thu, 27 May 2021 15:41:34 +0000 Subject: [PATCH 2/3] dlangbot.app: Don't trigger Bugzilla actions on non-Bugzilla projects Use the same list of Bugzilla-using projects as when posting the comment to decide whether to interact with Bugzilla. --- source/dlangbot/app.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/dlangbot/app.d b/source/dlangbot/app.d index f89cafd..d104bd4 100644 --- a/source/dlangbot/app.d +++ b/source/dlangbot/app.d @@ -186,7 +186,7 @@ void cronDaily(string[] repositories, CronConfig config) void handlePR(string action, PullRequest* _pr) { - import std.algorithm : among, any; + import std.algorithm : among, any, canFind; import vibe.core.core : setTimer; import dlangbot.warnings : checkForWarnings, UserMessage; import std.format : format; @@ -277,7 +277,7 @@ void handlePR(string action, PullRequest* _pr) // When a PR is opened or updated mentioning some Bugzilla issues, // post a link to the PR as an issue comment. - if (runBugzillaUpdates && pr.base.repo.get().owner.login == "dlang" && + if (runBugzillaUpdates && bugzillaProjectSlugs.canFind(pr.repoSlug) && (action == "opened" || action == "synchronize" || action == "ready_for_review")) { import std.algorithm.iteration : filter, map; @@ -323,7 +323,7 @@ void handlePR(string action, PullRequest* _pr) // When a PR is merged, update Bugzilla issues // (leave a comment with a link to the PR, and close them appropriately). - if (runBugzillaUpdates && pr.base.repo.get().owner.login == "dlang" && + if (runBugzillaUpdates && bugzillaProjectSlugs.canFind(pr.repoSlug) && action == "merged") { import std.algorithm.iteration : filter, map; From 1c6d36db675eae7bea6bda4b538e076768abe9a3 Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Thu, 27 May 2021 15:46:41 +0000 Subject: [PATCH 3/3] dlang-bot.test.bugzilla: Add test --- data/hooks/github/dlang_dub_merged_12345.json | 449 ++++++++++++++++++ ...thub_repos_dlang_dub_issues_12345_comments | 254 ++++++++++ ...github_repos_dlang_dub_pulls_12345_commits | 72 +++ test/bugzilla.d | 15 + 4 files changed, 790 insertions(+) create mode 100644 data/hooks/github/dlang_dub_merged_12345.json create mode 100644 data/payloads/github_repos_dlang_dub_issues_12345_comments create mode 100644 data/payloads/github_repos_dlang_dub_pulls_12345_commits diff --git a/data/hooks/github/dlang_dub_merged_12345.json b/data/hooks/github/dlang_dub_merged_12345.json new file mode 100644 index 0000000..a00c16c --- /dev/null +++ b/data/hooks/github/dlang_dub_merged_12345.json @@ -0,0 +1,449 @@ +{ + "action": "closed", + "number": 12345, + "pull_request": { + "url": "https://api.github.com/repos/dlang/dub/pulls/12345", + "id": 98410165, + "html_url": "https://github.com/dlang/dub/pull/12345", + "diff_url": "https://github.com/dlang/dub/pull/12345.diff", + "patch_url": "https://github.com/dlang/dub/pull/12345.patch", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "number": 12345, + "state": "closed", + "locked": false, + "title": "[DEMO for DIP1005] Converted imports to selective imports in std.array", + "user": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "body": "For the second demo I managed to replace all imports with selective imports in std.array. It was a major effort that involved grepping for heuristics such as \"static if\", \"typeof\", \"^if\", \"compiles\", \"has\", \"\\Wis\" etc. A few examples of the difficulties for fun:\r\n\r\n1. Remove `isStaticArray` from the import list. The error is:\r\n\r\n```\r\nstd/conv.d(4169): Error: static assert \"DirIteratorImpl cannot be emplaced from (string, SpanMode, bool).\"\r\nstd/conv.d(4250): instantiated from here: emplaceRef!(DirIteratorImpl, DirIteratorImpl, string, SpanMode, bool)\r\nstd/typecons.d(4998): instantiated from here: emplace!(DirIteratorImpl, string, SpanMode, bool)\r\nstd/typecons.d(5091): instantiated from here: initialize!(string, SpanMode, bool)\r\nstd/file.d(3802): instantiated from here: __ctor!(string, SpanMode, bool)\r\n```\r\n\r\nThis alone took me some 15-20 minutes and almost had me give up.\r\n\r\n2, Remove `hasElaborateAssign` from the import list. The error is:\r\n\r\n```\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3812): Error: template instance std.conv.textImpl!(string, string, const(char)[]) error instantiating\r\nstd/format.d(912): instantiated from here: text!(string, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(103): Error: template instance std.format.FormatSpec!(immutable(char)) error instantiating\r\nstd/conv.d(939): instantiated from here: toStr!(string, dchar)\r\nstd/conv.d(172): instantiated from here: toImpl!(string, dchar)\r\nstd/conv.d(3857): instantiated from here: to!dchar\r\nstd/conv.d(3812): ... (4 instantiations, -v to show) ...\r\nstd/format.d(977): instantiated from here: parse!(int, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3812): Error: template instance std.conv.textImpl!(string, string, string, string) error instantiating\r\nstd/conv.d(58): instantiated from here: text!(string, string, string)\r\nstd/conv.d(2072): instantiated from here: convError!(const(char)[], int)\r\nstd/format.d(977): instantiated from here: parse!(int, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/conv.d(2072): Error: template instance std.conv.convError!(const(char)[], uint) error instantiating\r\nstd/format.d(990): instantiated from here: parse!(uint, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/format.d(1011): Error: template instance std.conv.parse!(ubyte, const(char)[]) error instantiating\r\n```\r\n\r\n3. Remove `isAssignable`. Error message is:\r\n\r\n```\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3812): Error: template instance std.conv.textImpl!(string, string, const(char)[]) error instantiating\r\nstd/format.d(912): instantiated from here: text!(string, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(103): Error: template instance std.format.FormatSpec!(immutable(char)) error instantiating\r\nstd/conv.d(939): instantiated from here: toStr!(string, dchar)\r\nstd/conv.d(172): instantiated from here: toImpl!(string, dchar)\r\nstd/conv.d(3857): instantiated from here: to!dchar\r\nstd/conv.d(3812): ... (4 instantiations, -v to show) ...\r\nstd/format.d(977): instantiated from here: parse!(int, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3857): Error: template std.array.Appender!string.Appender.put cannot deduce function from argument types !()(string), candidates are:\r\nstd/array.d(2823): std.array.Appender!string.Appender.put(U)(U item) if (canPutItem!U)\r\nstd/array.d(2851): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutConstRange!Range)\r\nstd/array.d(2860): std.array.Appender!string.Appender.put(Range)(Range items) if (canPutRange!Range)\r\nstd/conv.d(3812): Error: template instance std.conv.textImpl!(string, string, string, string) error instantiating\r\nstd/conv.d(58): instantiated from here: text!(string, string, string)\r\nstd/conv.d(2072): instantiated from here: convError!(const(char)[], int)\r\nstd/format.d(977): instantiated from here: parse!(int, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/conv.d(2072): Error: template instance std.conv.convError!(const(char)[], uint) error instantiating\r\nstd/format.d(990): instantiated from here: parse!(uint, const(char)[])\r\nstd/bigint.d(867): instantiated from here: FormatSpec!char\r\nstd/format.d(1011): Error: template instance std.conv.parse!(ubyte, const(char)[]) error instantiating\r\n```\r\n\r\n4. Remove `isImplicitlyConvertible` with the result:\r\n\r\n```\r\nstd/range/primitives.d(347): Error: static assert \"Cannot put a const(char) into a Appender!string.\"\r\nstd/format.d(1452): instantiated from here: put!(Appender!string, const(char))\r\nstd/format.d(3485): instantiated from here: formatValue!(Appender!string, ulong, char)\r\nstd/format.d(464): instantiated from here: formatGeneric!(Appender!string, ulong, char)\r\nstd/format.d(6482): ... (1 instantiations, -v to show) ...\r\nstd/typecons.d(400): instantiated from here: format!(char, ulong, ulong)\r\nstd/encoding.d(3468): instantiated from here: Tuple!(BOM, \"schema\", ubyte[], \"sequence\")\r\n```\r\n\r\n", + "created_at": "2016-12-16T22:02:22Z", + "updated_at": "2016-12-17T17:26:17Z", + "closed_at": "2016-12-17T17:26:17Z", + "merged_at": "2016-12-17T17:26:17Z", + "merge_commit_sha": "996543316ee5d6212151b5dda2cb3489e3b31c5c", + "assignee": null, + "assignees": [ + + ], + "milestone": null, + "commits_url": "https://api.github.com/repos/dlang/dub/pulls/12345/commits", + "review_comments_url": "https://api.github.com/repos/dlang/dub/pulls/12345/comments", + "review_comment_url": "https://api.github.com/repos/dlang/dub/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/dlang/dub/issues/12345/comments", + "statuses_url": "https://api.github.com/repos/dlang/dub/statuses/e064d5664f92c4b2f0866c08f6d0290ba66825ed", + "head": { + "label": "andralex:selective_import_demo", + "ref": "selective_import_demo", + "sha": "e064d5664f92c4b2f0866c08f6d0290ba66825ed", + "user": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "repo": { + "id": 1415983, + "name": "dub", + "full_name": "andralex/dub", + "owner": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/andralex/dub", + "description": "Runtime library for the D programming language", + "fork": true, + "url": "https://api.github.com/repos/andralex/dub", + "forks_url": "https://api.github.com/repos/andralex/dub/forks", + "keys_url": "https://api.github.com/repos/andralex/dub/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/andralex/dub/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/andralex/dub/teams", + "hooks_url": "https://api.github.com/repos/andralex/dub/hooks", + "issue_events_url": "https://api.github.com/repos/andralex/dub/issues/events{/number}", + "events_url": "https://api.github.com/repos/andralex/dub/events", + "assignees_url": "https://api.github.com/repos/andralex/dub/assignees{/user}", + "branches_url": "https://api.github.com/repos/andralex/dub/branches{/branch}", + "tags_url": "https://api.github.com/repos/andralex/dub/tags", + "blobs_url": "https://api.github.com/repos/andralex/dub/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/andralex/dub/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/andralex/dub/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/andralex/dub/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/andralex/dub/statuses/{sha}", + "languages_url": "https://api.github.com/repos/andralex/dub/languages", + "stargazers_url": "https://api.github.com/repos/andralex/dub/stargazers", + "contributors_url": "https://api.github.com/repos/andralex/dub/contributors", + "subscribers_url": "https://api.github.com/repos/andralex/dub/subscribers", + "subscription_url": "https://api.github.com/repos/andralex/dub/subscription", + "commits_url": "https://api.github.com/repos/andralex/dub/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/andralex/dub/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/andralex/dub/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/andralex/dub/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/andralex/dub/contents/{+path}", + "compare_url": "https://api.github.com/repos/andralex/dub/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/andralex/dub/merges", + "archive_url": "https://api.github.com/repos/andralex/dub/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/andralex/dub/downloads", + "issues_url": "https://api.github.com/repos/andralex/dub/issues{/number}", + "pulls_url": "https://api.github.com/repos/andralex/dub/pulls{/number}", + "milestones_url": "https://api.github.com/repos/andralex/dub/milestones{/number}", + "notifications_url": "https://api.github.com/repos/andralex/dub/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/andralex/dub/labels{/name}", + "releases_url": "https://api.github.com/repos/andralex/dub/releases{/id}", + "deployments_url": "https://api.github.com/repos/andralex/dub/deployments", + "created_at": "2011-02-26T21:18:12Z", + "updated_at": "2015-09-27T06:56:02Z", + "pushed_at": "2016-12-17T16:50:22Z", + "git_url": "git://github.com/andralex/dub.git", + "ssh_url": "git@github.com:andralex/dub.git", + "clone_url": "https://github.com/andralex/dub.git", + "svn_url": "https://github.com/andralex/dub", + "homepage": "d-programming-language.org", + "size": 47965, + "stargazers_count": 24, + "watchers_count": 24, + "language": "D", + "has_issues": false, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 4, + "mirror_url": null, + "open_issues_count": 0, + "forks": 4, + "open_issues": 0, + "watchers": 24, + "default_branch": "master" + } + }, + "base": { + "label": "dlang:master", + "ref": "master", + "sha": "f3a840144a156fce5efee82ca13152c2ac1ef1c3", + "user": { + "login": "dlang", + "id": 565913, + "avatar_url": "https://avatars.githubusercontent.com/u/565913?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/dlang", + "html_url": "https://github.com/dlang", + "followers_url": "https://api.github.com/users/dlang/followers", + "following_url": "https://api.github.com/users/dlang/following{/other_user}", + "gists_url": "https://api.github.com/users/dlang/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dlang/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dlang/subscriptions", + "organizations_url": "https://api.github.com/users/dlang/orgs", + "repos_url": "https://api.github.com/users/dlang/repos", + "events_url": "https://api.github.com/users/dlang/events{/privacy}", + "received_events_url": "https://api.github.com/users/dlang/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 1257084, + "name": "dub", + "full_name": "dlang/dub", + "owner": { + "login": "dlang", + "id": 565913, + "avatar_url": "https://avatars.githubusercontent.com/u/565913?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/dlang", + "html_url": "https://github.com/dlang", + "followers_url": "https://api.github.com/users/dlang/followers", + "following_url": "https://api.github.com/users/dlang/following{/other_user}", + "gists_url": "https://api.github.com/users/dlang/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dlang/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dlang/subscriptions", + "organizations_url": "https://api.github.com/users/dlang/orgs", + "repos_url": "https://api.github.com/users/dlang/repos", + "events_url": "https://api.github.com/users/dlang/events{/privacy}", + "received_events_url": "https://api.github.com/users/dlang/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/dlang/dub", + "description": "The standard library of the D programming language", + "fork": false, + "url": "https://api.github.com/repos/dlang/dub", + "forks_url": "https://api.github.com/repos/dlang/dub/forks", + "keys_url": "https://api.github.com/repos/dlang/dub/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/dlang/dub/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/dlang/dub/teams", + "hooks_url": "https://api.github.com/repos/dlang/dub/hooks", + "issue_events_url": "https://api.github.com/repos/dlang/dub/issues/events{/number}", + "events_url": "https://api.github.com/repos/dlang/dub/events", + "assignees_url": "https://api.github.com/repos/dlang/dub/assignees{/user}", + "branches_url": "https://api.github.com/repos/dlang/dub/branches{/branch}", + "tags_url": "https://api.github.com/repos/dlang/dub/tags", + "blobs_url": "https://api.github.com/repos/dlang/dub/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/dlang/dub/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/dlang/dub/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/dlang/dub/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/dlang/dub/statuses/{sha}", + "languages_url": "https://api.github.com/repos/dlang/dub/languages", + "stargazers_url": "https://api.github.com/repos/dlang/dub/stargazers", + "contributors_url": "https://api.github.com/repos/dlang/dub/contributors", + "subscribers_url": "https://api.github.com/repos/dlang/dub/subscribers", + "subscription_url": "https://api.github.com/repos/dlang/dub/subscription", + "commits_url": "https://api.github.com/repos/dlang/dub/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/dlang/dub/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/dlang/dub/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/dlang/dub/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/dlang/dub/contents/{+path}", + "compare_url": "https://api.github.com/repos/dlang/dub/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/dlang/dub/merges", + "archive_url": "https://api.github.com/repos/dlang/dub/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/dlang/dub/downloads", + "issues_url": "https://api.github.com/repos/dlang/dub/issues{/number}", + "pulls_url": "https://api.github.com/repos/dlang/dub/pulls{/number}", + "milestones_url": "https://api.github.com/repos/dlang/dub/milestones{/number}", + "notifications_url": "https://api.github.com/repos/dlang/dub/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/dlang/dub/labels{/name}", + "releases_url": "https://api.github.com/repos/dlang/dub/releases{/id}", + "deployments_url": "https://api.github.com/repos/dlang/dub/deployments", + "created_at": "2011-01-15T07:00:06Z", + "updated_at": "2016-12-17T02:47:12Z", + "pushed_at": "2016-12-17T17:26:17Z", + "git_url": "git://github.com/dlang/dub.git", + "ssh_url": "git@github.com:dlang/dub.git", + "clone_url": "https://github.com/dlang/dub.git", + "svn_url": "https://github.com/dlang/dub", + "homepage": "dlang.org/dub", + "size": 47676, + "stargazers_count": 761, + "watchers_count": 761, + "language": "D", + "has_issues": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "forks_count": 524, + "mirror_url": null, + "open_issues_count": 85, + "forks": 524, + "open_issues": 85, + "watchers": 761, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/dlang/dub/pulls/12345" + }, + "html": { + "href": "https://github.com/dlang/dub/pull/12345" + }, + "issue": { + "href": "https://api.github.com/repos/dlang/dub/issues/12345" + }, + "comments": { + "href": "https://api.github.com/repos/dlang/dub/issues/12345/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/dlang/dub/pulls/12345/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/dlang/dub/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/dlang/dub/pulls/12345/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/dlang/dub/statuses/e064d5664f92c4b2f0866c08f6d0290ba66825ed" + } + }, + "merged": true, + "mergeable": null, + "mergeable_state": "unknown", + "merged_by": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "comments": 4, + "review_comments": 0, + "commits": 1, + "additions": 14, + "deletions": 8, + "changed_files": 1 + }, + "repository": { + "id": 1257084, + "name": "dub", + "full_name": "dlang/dub", + "owner": { + "login": "dlang", + "id": 565913, + "avatar_url": "https://avatars.githubusercontent.com/u/565913?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/dlang", + "html_url": "https://github.com/dlang", + "followers_url": "https://api.github.com/users/dlang/followers", + "following_url": "https://api.github.com/users/dlang/following{/other_user}", + "gists_url": "https://api.github.com/users/dlang/gists{/gist_id}", + "starred_url": "https://api.github.com/users/dlang/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/dlang/subscriptions", + "organizations_url": "https://api.github.com/users/dlang/orgs", + "repos_url": "https://api.github.com/users/dlang/repos", + "events_url": "https://api.github.com/users/dlang/events{/privacy}", + "received_events_url": "https://api.github.com/users/dlang/received_events", + "type": "Organization", + "site_admin": false + }, + "private": false, + "html_url": "https://github.com/dlang/dub", + "description": "The standard library of the D programming language", + "fork": false, + "url": "https://api.github.com/repos/dlang/dub", + "forks_url": "https://api.github.com/repos/dlang/dub/forks", + "keys_url": "https://api.github.com/repos/dlang/dub/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/dlang/dub/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/dlang/dub/teams", + "hooks_url": "https://api.github.com/repos/dlang/dub/hooks", + "issue_events_url": "https://api.github.com/repos/dlang/dub/issues/events{/number}", + "events_url": "https://api.github.com/repos/dlang/dub/events", + "assignees_url": "https://api.github.com/repos/dlang/dub/assignees{/user}", + "branches_url": "https://api.github.com/repos/dlang/dub/branches{/branch}", + "tags_url": "https://api.github.com/repos/dlang/dub/tags", + "blobs_url": "https://api.github.com/repos/dlang/dub/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/dlang/dub/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/dlang/dub/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/dlang/dub/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/dlang/dub/statuses/{sha}", + "languages_url": "https://api.github.com/repos/dlang/dub/languages", + "stargazers_url": "https://api.github.com/repos/dlang/dub/stargazers", + "contributors_url": "https://api.github.com/repos/dlang/dub/contributors", + "subscribers_url": "https://api.github.com/repos/dlang/dub/subscribers", + "subscription_url": "https://api.github.com/repos/dlang/dub/subscription", + "commits_url": "https://api.github.com/repos/dlang/dub/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/dlang/dub/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/dlang/dub/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/dlang/dub/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/dlang/dub/contents/{+path}", + "compare_url": "https://api.github.com/repos/dlang/dub/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/dlang/dub/merges", + "archive_url": "https://api.github.com/repos/dlang/dub/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/dlang/dub/downloads", + "issues_url": "https://api.github.com/repos/dlang/dub/issues{/number}", + "pulls_url": "https://api.github.com/repos/dlang/dub/pulls{/number}", + "milestones_url": "https://api.github.com/repos/dlang/dub/milestones{/number}", + "notifications_url": "https://api.github.com/repos/dlang/dub/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/dlang/dub/labels{/name}", + "releases_url": "https://api.github.com/repos/dlang/dub/releases{/id}", + "deployments_url": "https://api.github.com/repos/dlang/dub/deployments", + "created_at": "2011-01-15T07:00:06Z", + "updated_at": "2016-12-17T02:47:12Z", + "pushed_at": "2016-12-17T17:26:17Z", + "git_url": "git://github.com/dlang/dub.git", + "ssh_url": "git@github.com:dlang/dub.git", + "clone_url": "https://github.com/dlang/dub.git", + "svn_url": "https://github.com/dlang/dub", + "homepage": "dlang.org/dub", + "size": 47676, + "stargazers_count": 761, + "watchers_count": 761, + "language": "D", + "has_issues": false, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "forks_count": 524, + "mirror_url": null, + "open_issues_count": 85, + "forks": 524, + "open_issues": 85, + "watchers": 761, + "default_branch": "master" + }, + "organization": { + "login": "dlang", + "id": 565913, + "url": "https://api.github.com/orgs/dlang", + "repos_url": "https://api.github.com/orgs/dlang/repos", + "events_url": "https://api.github.com/orgs/dlang/events", + "hooks_url": "https://api.github.com/orgs/dlang/hooks", + "issues_url": "https://api.github.com/orgs/dlang/issues", + "members_url": "https://api.github.com/orgs/dlang/members{/member}", + "public_members_url": "https://api.github.com/orgs/dlang/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/565913?v=3", + "description": null + }, + "sender": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + } +} \ No newline at end of file diff --git a/data/payloads/github_repos_dlang_dub_issues_12345_comments b/data/payloads/github_repos_dlang_dub_issues_12345_comments new file mode 100644 index 0000000..d6e6350 --- /dev/null +++ b/data/payloads/github_repos_dlang_dub_issues_12345_comments @@ -0,0 +1,254 @@ +[ + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267737793", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267737793", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267737793, + "user": { + "login": "timotheecour", + "id": 2194784, + "avatar_url": "https://avatars.githubusercontent.com/u/2194784?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/timotheecour", + "html_url": "https://github.com/timotheecour", + "followers_url": "https://api.github.com/users/timotheecour/followers", + "following_url": "https://api.github.com/users/timotheecour/following{/other_user}", + "gists_url": "https://api.github.com/users/timotheecour/gists{/gist_id}", + "starred_url": "https://api.github.com/users/timotheecour/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/timotheecour/subscriptions", + "organizations_url": "https://api.github.com/users/timotheecour/orgs", + "repos_url": "https://api.github.com/users/timotheecour/repos", + "events_url": "https://api.github.com/users/timotheecour/events{/privacy}", + "received_events_url": "https://api.github.com/users/timotheecour/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T02:37:29Z", + "updated_at": "2016-12-17T02:37:29Z", + "body": "couldn't that be done with tooling ? (if not with existing traits, at least via instrumenting dmd)" + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267759950", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267759950", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267759950, + "user": { + "login": "WalterBright", + "id": 568298, + "avatar_url": "https://avatars.githubusercontent.com/u/568298?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/WalterBright", + "html_url": "https://github.com/WalterBright", + "followers_url": "https://api.github.com/users/WalterBright/followers", + "following_url": "https://api.github.com/users/WalterBright/following{/other_user}", + "gists_url": "https://api.github.com/users/WalterBright/gists{/gist_id}", + "starred_url": "https://api.github.com/users/WalterBright/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/WalterBright/subscriptions", + "organizations_url": "https://api.github.com/users/WalterBright/orgs", + "repos_url": "https://api.github.com/users/WalterBright/repos", + "events_url": "https://api.github.com/users/WalterBright/events{/privacy}", + "received_events_url": "https://api.github.com/users/WalterBright/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T12:22:46Z", + "updated_at": "2016-12-17T12:22:46Z", + "body": "Why not pull it?" + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267772880", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267772880", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267772880, + "user": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T16:49:06Z", + "updated_at": "2016-12-17T16:49:06Z", + "body": "@timotheecour it could, but @WalterBright warned the tool would be highly nontrivial.\r\n\r\n@WalterBright good idea, I'll pull." + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267773560", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267773560", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267773560, + "user": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T16:58:13Z", + "updated_at": "2016-12-17T16:58:13Z", + "body": "Auto-merge toggled on" + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267775518", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267775518", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267775518, + "user": { + "login": "CyberShadow", + "id": 160894, + "avatar_url": "https://avatars.githubusercontent.com/u/160894?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/CyberShadow", + "html_url": "https://github.com/CyberShadow", + "followers_url": "https://api.github.com/users/CyberShadow/followers", + "following_url": "https://api.github.com/users/CyberShadow/following{/other_user}", + "gists_url": "https://api.github.com/users/CyberShadow/gists{/gist_id}", + "starred_url": "https://api.github.com/users/CyberShadow/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/CyberShadow/subscriptions", + "organizations_url": "https://api.github.com/users/CyberShadow/orgs", + "repos_url": "https://api.github.com/users/CyberShadow/repos", + "events_url": "https://api.github.com/users/CyberShadow/events{/privacy}", + "received_events_url": "https://api.github.com/users/CyberShadow/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T17:34:32Z", + "updated_at": "2016-12-17T17:34:32Z", + "body": "> @timotheecour it could, but @WalterBright warned the tool would be highly nontrivial.\r\n\r\nJust brute-force it.\r\n\r\nExpand all imports to selective imports of all symbols, then wrap imports in a DustMite comment block and run it through DustMite. We did something similar at DConf 2016 to minimize imports in ddmd." + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267775601", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267775601", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267775601, + "user": { + "login": "CyberShadow", + "id": 160894, + "avatar_url": "https://avatars.githubusercontent.com/u/160894?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/CyberShadow", + "html_url": "https://github.com/CyberShadow", + "followers_url": "https://api.github.com/users/CyberShadow/followers", + "following_url": "https://api.github.com/users/CyberShadow/following{/other_user}", + "gists_url": "https://api.github.com/users/CyberShadow/gists{/gist_id}", + "starred_url": "https://api.github.com/users/CyberShadow/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/CyberShadow/subscriptions", + "organizations_url": "https://api.github.com/users/CyberShadow/orgs", + "repos_url": "https://api.github.com/users/CyberShadow/repos", + "events_url": "https://api.github.com/users/CyberShadow/events{/privacy}", + "received_events_url": "https://api.github.com/users/CyberShadow/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T17:36:10Z", + "updated_at": "2016-12-17T17:36:10Z", + "body": "Which Phobos modules do you want this done on? I could do this in bulk. (After my current reduction finishes.)" + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267779176", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267779176", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267779176, + "user": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T18:38:17Z", + "updated_at": "2016-12-17T18:38:17Z", + "body": "@CyberShadow the point of this experiment is to illustrates the steps (and the ongoing maintenance) needed to take advantage of lazy imports, which have not been implemented. As of now, doing this is just giving us more maintenance to do of these lists." + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267780746", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267780746", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267780746, + "user": { + "login": "CyberShadow", + "id": 160894, + "avatar_url": "https://avatars.githubusercontent.com/u/160894?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/CyberShadow", + "html_url": "https://github.com/CyberShadow", + "followers_url": "https://api.github.com/users/CyberShadow/followers", + "following_url": "https://api.github.com/users/CyberShadow/following{/other_user}", + "gists_url": "https://api.github.com/users/CyberShadow/gists{/gist_id}", + "starred_url": "https://api.github.com/users/CyberShadow/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/CyberShadow/subscriptions", + "organizations_url": "https://api.github.com/users/CyberShadow/orgs", + "repos_url": "https://api.github.com/users/CyberShadow/repos", + "events_url": "https://api.github.com/users/CyberShadow/events{/privacy}", + "received_events_url": "https://api.github.com/users/CyberShadow/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T19:01:45Z", + "updated_at": "2016-12-17T19:01:45Z", + "body": "Sorry, I don't get it? Was this PR made to prove some point?\r\n\r\n> It was a major effort\r\n\r\nWell... all I'm saying is that it didn't need to be.\r\n\r\nIs there any practical reason why I shouldn't have a go at replacing module imports with selective imports throughout Phobos? Really shouldn't take much effort, just some setup and CPU time to do the reduction.\r\n\r\nI'm confused, if this change was not good, then why was it merged? And if it was good, then why shouldn't we have more of it, especially if there's an easy way to do it?" + }, + { + "url": "https://api.github.com/repos/dlang/dub/issues/comments/267781743", + "html_url": "https://github.com/dlang/dub/pull/12345#issuecomment-267781743", + "issue_url": "https://api.github.com/repos/dlang/dub/issues/12345", + "id": 267781743, + "user": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "created_at": "2016-12-17T19:21:20Z", + "updated_at": "2016-12-17T19:21:20Z", + "body": ">Sorry, I don't get it? Was this PR made to prove some point?\r\n\r\nYes. The point was to preview the kind of setup that would have all explicit declarations.\r\n\r\n>> It was a major effort\r\n\r\n>Well... all I'm saying is that it didn't need to be.\r\n\r\nUnderstood, thanks.\r\n\r\n>Is there any practical reason why I shouldn't have a go at replacing module imports with selective imports throughout Phobos?\r\n\r\nThe replacement has no value except it adds one extra chore to maintain.\r\n\r\n>I'm confused, if this change was not good, then why was it merged? And if it was good, then why shouldn't we have more of it, especially if there's an easy way to do it?\r\n\r\nI will undo the PR." + } +] diff --git a/data/payloads/github_repos_dlang_dub_pulls_12345_commits b/data/payloads/github_repos_dlang_dub_pulls_12345_commits new file mode 100644 index 0000000..35e89d2 --- /dev/null +++ b/data/payloads/github_repos_dlang_dub_pulls_12345_commits @@ -0,0 +1,72 @@ +[ + { + "sha": "e064d5664f92c4b2f0866c08f6d0290ba66825ed", + "commit": { + "author": { + "name": "Andrei Alexandrescu", + "email": "andrei@erdani.com", + "date": "2016-12-16T21:54:13Z" + }, + "committer": { + "name": "Andrei Alexandrescu", + "email": "andrei@erdani.com", + "date": "2016-12-17T16:50:16Z" + }, + "message": "[DEMO][DONOTPULL] Converted imports to selective imports in std.array", + "tree": { + "sha": "b3106d04851a8f349b6cfdcfd7c9db663edbbfcb", + "url": "https://api.github.com/repos/dlang/dub/git/trees/b3106d04851a8f349b6cfdcfd7c9db663edbbfcb" + }, + "url": "https://api.github.com/repos/dlang/dub/git/commits/e064d5664f92c4b2f0866c08f6d0290ba66825ed", + "comment_count": 0 + }, + "url": "https://api.github.com/repos/dlang/dub/commits/e064d5664f92c4b2f0866c08f6d0290ba66825ed", + "html_url": "https://github.com/dlang/dub/commit/e064d5664f92c4b2f0866c08f6d0290ba66825ed", + "comments_url": "https://api.github.com/repos/dlang/dub/commits/e064d5664f92c4b2f0866c08f6d0290ba66825ed/comments", + "author": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "committer": { + "login": "andralex", + "id": 566679, + "avatar_url": "https://avatars.githubusercontent.com/u/566679?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/andralex", + "html_url": "https://github.com/andralex", + "followers_url": "https://api.github.com/users/andralex/followers", + "following_url": "https://api.github.com/users/andralex/following{/other_user}", + "gists_url": "https://api.github.com/users/andralex/gists{/gist_id}", + "starred_url": "https://api.github.com/users/andralex/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/andralex/subscriptions", + "organizations_url": "https://api.github.com/users/andralex/orgs", + "repos_url": "https://api.github.com/users/andralex/repos", + "events_url": "https://api.github.com/users/andralex/events{/privacy}", + "received_events_url": "https://api.github.com/users/andralex/received_events", + "type": "User", + "site_admin": false + }, + "parents": [ + { + "sha": "19445fc71e8aabdbd42f0ad8a571a57601a5ff39", + "url": "https://api.github.com/repos/dlang/dub/commits/19445fc71e8aabdbd42f0ad8a571a57601a5ff39", + "html_url": "https://github.com/dlang/dub/commit/19445fc71e8aabdbd42f0ad8a571a57601a5ff39" + } + ] + } +] diff --git a/test/bugzilla.d b/test/bugzilla.d index d760a0d..8a94664 100644 --- a/test/bugzilla.d +++ b/test/bugzilla.d @@ -125,6 +125,21 @@ unittest }); } +@("after-merge-dont-comment-non-bugzilla") +unittest +{ + setAPIExpectations( + "/github/repos/dlang/dub/pulls/12345/commits", (ref Json j) { + j[0]["commit"]["message"] = "Do something with Issue 17564"; + }, + "/github/repos/dlang/dub/issues/12345/comments", + ); + + postGitHubHook("dlang_dub_merged_12345.json", "pull_request", (ref Json j, scope req) { + j["pull_request"]["base"]["repo"]["owner"]["login"] = "dlang-community"; + }); +} + @("after-merge-dont-spam-bugzilla") unittest {