This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 1cf01e3b github pr task refactor (#2203)
1cf01e3b is described below
commit 1cf01e3b903932c29c34444b8a1ffeb974add40c
Author: likyh <[email protected]>
AuthorDate: Thu Jun 16 23:00:53 2022 +0800
github pr task refactor (#2203)
* base csv
* add e2e test and replace dal
* add connection id for pr
* append
* fix comments
Co-authored-by: linyh <[email protected]>
---
plugins/github/e2e/issue_test.go | 8 +-
plugins/github/e2e/pr_test.go | 142 +++++++++++++++++++++
.../raw_tables/_raw_github_api_pull_requests.csv | 50 ++++++++
.../_tool_github_pull_request_labels.csv | 35 +++++
.../snapshot_tables/_tool_github_pull_requests.csv | 50 ++++++++
.../e2e/snapshot_tables/pull_request_labels.csv | 35 +++++
.../github/e2e/snapshot_tables/pull_requests.csv | 50 ++++++++
.../migrationscripts/archived/pull_request.go | 1 +
.../archived/pull_request_label.go | 5 +-
.../migrationscripts/init_schema_20220611.go | 2 +-
plugins/github/models/pr.go | 1 +
plugins/github/models/pr_label.go | 5 +-
plugins/github/tasks/pr_collector.go | 17 ++-
plugins/github/tasks/pr_convertor.go | 17 ++-
plugins/github/tasks/pr_extractor.go | 15 ++-
plugins/github/tasks/pr_label_convertor.go | 21 +--
16 files changed, 417 insertions(+), 37 deletions(-)
diff --git a/plugins/github/e2e/issue_test.go b/plugins/github/e2e/issue_test.go
index 068d1128..8e307533 100644
--- a/plugins/github/e2e/issue_test.go
+++ b/plugins/github/e2e/issue_test.go
@@ -58,7 +58,7 @@ func TestIssueDataFlow(t *testing.T) {
// import raw data table
dataflowTester.ImportCsvIntoRawTable("./raw_tables/_raw_github_api_issues.csv",
"_raw_github_api_issues")
- // verify extraction
+ // verify issue extraction
dataflowTester.FlushTabler(&models.GithubIssue{})
dataflowTester.FlushTabler(&models.GithubIssueLabel{})
dataflowTester.Subtask(tasks.ExtractApiIssuesMeta, taskData)
@@ -91,8 +91,6 @@ func TestIssueDataFlow(t *testing.T) {
"_raw_data_remark",
},
)
-
- // verify extraction
dataflowTester.VerifyTable(
models.GithubIssueLabel{},
fmt.Sprintf("./snapshot_tables/%s.csv",
models.GithubIssueLabel{}.TableName()),
@@ -105,7 +103,7 @@ func TestIssueDataFlow(t *testing.T) {
},
)
- // verify extraction
+ // verify issue conversion
dataflowTester.FlushTabler(&ticket.Issue{})
dataflowTester.FlushTabler(&ticket.BoardIssue{})
dataflowTester.Subtask(tasks.ConvertIssuesMeta, taskData)
@@ -148,7 +146,7 @@ func TestIssueDataFlow(t *testing.T) {
[]string{},
)
- // verify extraction
+ // verify issue labels conversion
dataflowTester.FlushTabler(&ticket.IssueLabel{})
dataflowTester.Subtask(tasks.ConvertIssueLabelsMeta, taskData)
dataflowTester.VerifyTable(
diff --git a/plugins/github/e2e/pr_test.go b/plugins/github/e2e/pr_test.go
new file mode 100644
index 00000000..cca678af
--- /dev/null
+++ b/plugins/github/e2e/pr_test.go
@@ -0,0 +1,142 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package e2e
+
+import (
+ "fmt"
+ "github.com/apache/incubator-devlake/models/domainlayer/code"
+ "github.com/apache/incubator-devlake/plugins/github/models"
+ "testing"
+
+ "github.com/apache/incubator-devlake/helpers/e2ehelper"
+ "github.com/apache/incubator-devlake/plugins/github/impl"
+ "github.com/apache/incubator-devlake/plugins/github/tasks"
+)
+
+func TestPrDataFlow(t *testing.T) {
+ var plugin impl.Github
+ dataflowTester := e2ehelper.NewDataFlowTester(t, "gitlab", plugin)
+
+ githubRepository := &models.GithubRepo{
+ GithubId: 134018330,
+ }
+ taskData := &tasks.GithubTaskData{
+ Options: &tasks.GithubOptions{
+ ConnectionId: 1,
+ Owner: "panjf2000",
+ Repo: "ants",
+ Config: models.Config{
+ PrType: "type/(.*)$",
+ PrComponent: "component/(.*)$",
+ PrBodyClosePattern:
"(?mi)(fix|close|resolve|fixes|closes|resolves|fixed|closed|resolved)[\\s]*.*(((and
)?(#|https:\\/\\/github.com\\/%s\\/%s\\/issues\\/)\\d+[ ]*)+)",
+ },
+ },
+ Repo: githubRepository,
+ }
+
+ // import raw data table
+
dataflowTester.ImportCsvIntoRawTable("./raw_tables/_raw_github_api_pull_requests.csv",
"_raw_github_api_pull_requests")
+
+ // verify pr extraction
+ dataflowTester.FlushTabler(&models.GithubPullRequest{})
+ dataflowTester.FlushTabler(&models.GithubPullRequestLabel{})
+ dataflowTester.Subtask(tasks.ExtractApiPullRequestsMeta, taskData)
+ dataflowTester.VerifyTable(
+ models.GithubPullRequest{},
+ fmt.Sprintf("./snapshot_tables/%s.csv",
models.GithubPullRequest{}.TableName()),
+ []string{"connection_id", "github_id", "repo_id"},
+ []string{
+ "number",
+ "state",
+ "title",
+ "github_created_at",
+ "github_updated_at",
+ "closed_at",
+ "additions",
+ "deletions",
+ "comments",
+ "commits",
+ "review_comments",
+ "merged",
+ "merged_at",
+ "body",
+ "type",
+ "component",
+ "merge_commit_sha",
+ "head_ref",
+ "base_ref",
+ "base_commit_sha",
+ "head_commit_sha",
+ "url",
+ "author_name",
+ "author_id",
+ "_raw_data_params",
+ "_raw_data_table",
+ "_raw_data_id",
+ "_raw_data_remark",
+ },
+ )
+
+ dataflowTester.VerifyTable(
+ models.GithubPullRequestLabel{},
+ fmt.Sprintf("./snapshot_tables/%s.csv",
models.GithubPullRequestLabel{}.TableName()),
+ []string{"connection_id", "pull_id", "label_name"},
+ []string{},
+ )
+
+ // verify pr conversion
+ dataflowTester.FlushTabler(&code.PullRequest{})
+ dataflowTester.Subtask(tasks.ConvertPullRequestsMeta, taskData)
+ dataflowTester.VerifyTable(
+ code.PullRequest{},
+ fmt.Sprintf("./snapshot_tables/%s.csv",
code.PullRequest{}.TableName()),
+ []string{"id"},
+ []string{
+ "base_repo_id",
+ "head_repo_id",
+ "status",
+ "title",
+ "description",
+ "url",
+ "author_name",
+ "author_id",
+ "parent_pr_id",
+ "pull_request_key",
+ "created_date",
+ "merged_date",
+ "closed_date",
+ "type",
+ "component",
+ "merge_commit_sha",
+ "head_ref",
+ "base_ref",
+ "base_commit_sha",
+ "head_commit_sha",
+ },
+ )
+
+ // verify label conversion
+ dataflowTester.FlushTabler(&code.PullRequestLabel{})
+ dataflowTester.Subtask(tasks.ConvertPullRequestLabelsMeta, taskData)
+ dataflowTester.VerifyTable(
+ code.PullRequestLabel{},
+ fmt.Sprintf("./snapshot_tables/%s.csv",
code.PullRequestLabel{}.TableName()),
+ []string{"pull_request_id", "label_name"},
+ []string{},
+ )
+}
diff --git a/plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv
b/plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv
new file mode 100644
index 00000000..6db5f758
--- /dev/null
+++ b/plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv
@@ -0,0 +1,50 @@
+id,params,data,url,input,created_at
+246,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/4"",""id"":203756736,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjAzNzU2NzM2"",""html_url"":""https://github.com/panjf2000/ants/pull/4"",""diff_url"":""https://github.com/panjf2000/ants/pull/4.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/4.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/4"",""number"":4,""state"":""closed"",
[...]
+247,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/8"",""id"":211603583,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjExNjAzNTgz"",""html_url"":""https://github.com/panjf2000/ants/pull/8"",""diff_url"":""https://github.com/panjf2000/ants/pull/8.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/8.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/8"",""number"":8,""state"":""closed"",
[...]
+248,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/9"",""id"":212277907,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjEyMjc3OTA3"",""html_url"":""https://github.com/panjf2000/ants/pull/9"",""diff_url"":""https://github.com/panjf2000/ants/pull/9.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/9.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/9"",""number"":9,""state"":""closed"",
[...]
+249,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/11"",""id"":216254598,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE2MjU0NTk4"",""html_url"":""https://github.com/panjf2000/ants/pull/11"",""diff_url"":""https://github.com/panjf2000/ants/pull/11.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/11.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/11"",""number"":11,""state"":""clo
[...]
+250,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/13"",""id"":218939809,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE4OTM5ODA5"",""html_url"":""https://github.com/panjf2000/ants/pull/13"",""diff_url"":""https://github.com/panjf2000/ants/pull/13.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/13.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/13"",""number"":13,""state"":""clo
[...]
+251,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/14"",""id"":219363161,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE5MzYzMTYx"",""html_url"":""https://github.com/panjf2000/ants/pull/14"",""diff_url"":""https://github.com/panjf2000/ants/pull/14.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/14.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/14"",""number"":14,""state"":""clo
[...]
+252,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/15"",""id"":219936521,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE5OTM2NTIx"",""html_url"":""https://github.com/panjf2000/ants/pull/15"",""diff_url"":""https://github.com/panjf2000/ants/pull/15.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/15.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/15"",""number"":15,""state"":""clo
[...]
+253,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/16"",""id"":222703171,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjIyNzAzMTcx"",""html_url"":""https://github.com/panjf2000/ants/pull/16"",""diff_url"":""https://github.com/panjf2000/ants/pull/16.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/16.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/16"",""number"":16,""state"":""clo
[...]
+254,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/19"",""id"":231840723,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjMxODQwNzIz"",""html_url"":""https://github.com/panjf2000/ants/pull/19"",""diff_url"":""https://github.com/panjf2000/ants/pull/19.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/19.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/19"",""number"":19,""state"":""clo
[...]
+255,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/23"",""id"":246250598,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjQ2MjUwNTk4"",""html_url"":""https://github.com/panjf2000/ants/pull/23"",""diff_url"":""https://github.com/panjf2000/ants/pull/23.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/23.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/23"",""number"":23,""state"":""clo
[...]
+256,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/30"",""id"":267414275,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjY3NDE0Mjc1"",""html_url"":""https://github.com/panjf2000/ants/pull/30"",""diff_url"":""https://github.com/panjf2000/ants/pull/30.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/30.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/30"",""number"":30,""state"":""clo
[...]
+257,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/36"",""id"":292246524,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjkyMjQ2NTI0"",""html_url"":""https://github.com/panjf2000/ants/pull/36"",""diff_url"":""https://github.com/panjf2000/ants/pull/36.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/36.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/36"",""number"":36,""state"":""clo
[...]
+258,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/39"",""id"":300598936,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzAwNTk4OTM2"",""html_url"":""https://github.com/panjf2000/ants/pull/39"",""diff_url"":""https://github.com/panjf2000/ants/pull/39.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/39.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/39"",""number"":39,""state"":""clo
[...]
+259,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/40"",""id"":301421607,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzAxNDIxNjA3"",""html_url"":""https://github.com/panjf2000/ants/pull/40"",""diff_url"":""https://github.com/panjf2000/ants/pull/40.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/40.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/40"",""number"":40,""state"":""clo
[...]
+260,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/41"",""id"":308859272,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzA4ODU5Mjcy"",""html_url"":""https://github.com/panjf2000/ants/pull/41"",""diff_url"":""https://github.com/panjf2000/ants/pull/41.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/41.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/41"",""number"":41,""state"":""clo
[...]
+261,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/48"",""id"":311420898,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzExNDIwODk4"",""html_url"":""https://github.com/panjf2000/ants/pull/48"",""diff_url"":""https://github.com/panjf2000/ants/pull/48.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/48.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/48"",""number"":48,""state"":""clo
[...]
+262,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/51"",""id"":316337433,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzE2MzM3NDMz"",""html_url"":""https://github.com/panjf2000/ants/pull/51"",""diff_url"":""https://github.com/panjf2000/ants/pull/51.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/51.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/51"",""number"":51,""state"":""clo
[...]
+263,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/53"",""id"":325179595,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzI1MTc5NTk1"",""html_url"":""https://github.com/panjf2000/ants/pull/53"",""diff_url"":""https://github.com/panjf2000/ants/pull/53.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/53.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/53"",""number"":53,""state"":""clo
[...]
+264,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/54"",""id"":329127652,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzI5MTI3NjUy"",""html_url"":""https://github.com/panjf2000/ants/pull/54"",""diff_url"":""https://github.com/panjf2000/ants/pull/54.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/54.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/54"",""number"":54,""state"":""clo
[...]
+265,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/66"",""id"":346931859,""node_id"":""MDExOlB1bGxSZXF1ZXN0MzQ2OTMxODU5"",""html_url"":""https://github.com/panjf2000/ants/pull/66"",""diff_url"":""https://github.com/panjf2000/ants/pull/66.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/66.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/66"",""number"":66,""state"":""clo
[...]
+266,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/79"",""id"":379435034,""node_id"":""MDExOlB1bGxSZXF1ZXN0Mzc5NDM1MDM0"",""html_url"":""https://github.com/panjf2000/ants/pull/79"",""diff_url"":""https://github.com/panjf2000/ants/pull/79.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/79.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/79"",""number"":79,""state"":""clo
[...]
+267,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/87"",""id"":404931293,""node_id"":""MDExOlB1bGxSZXF1ZXN0NDA0OTMxMjkz"",""html_url"":""https://github.com/panjf2000/ants/pull/87"",""diff_url"":""https://github.com/panjf2000/ants/pull/87.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/87.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/87"",""number"":87,""state"":""clo
[...]
+268,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/89"",""id"":410487606,""node_id"":""MDExOlB1bGxSZXF1ZXN0NDEwNDg3NjA2"",""html_url"":""https://github.com/panjf2000/ants/pull/89"",""diff_url"":""https://github.com/panjf2000/ants/pull/89.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/89.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/89"",""number"":89,""state"":""clo
[...]
+269,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/91"",""id"":415925259,""node_id"":""MDExOlB1bGxSZXF1ZXN0NDE1OTI1MjU5"",""html_url"":""https://github.com/panjf2000/ants/pull/91"",""diff_url"":""https://github.com/panjf2000/ants/pull/91.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/91.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/91"",""number"":91,""state"":""clo
[...]
+270,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/100"",""id"":452382525,""node_id"":""MDExOlB1bGxSZXF1ZXN0NDUyMzgyNTI1"",""html_url"":""https://github.com/panjf2000/ants/pull/100"",""diff_url"":""https://github.com/panjf2000/ants/pull/100.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/100.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/100"",""number"":100,""state""
[...]
+271,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/103"",""id"":461992435,""node_id"":""MDExOlB1bGxSZXF1ZXN0NDYxOTkyNDM1"",""html_url"":""https://github.com/panjf2000/ants/pull/103"",""diff_url"":""https://github.com/panjf2000/ants/pull/103.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/103.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/103"",""number"":103,""state""
[...]
+272,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/107"",""id"":475457581,""node_id"":""MDExOlB1bGxSZXF1ZXN0NDc1NDU3NTgx"",""html_url"":""https://github.com/panjf2000/ants/pull/107"",""diff_url"":""https://github.com/panjf2000/ants/pull/107.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/107.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/107"",""number"":107,""state""
[...]
+273,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/111"",""id"":496172205,""node_id"":""MDExOlB1bGxSZXF1ZXN0NDk2MTcyMjA1"",""html_url"":""https://github.com/panjf2000/ants/pull/111"",""diff_url"":""https://github.com/panjf2000/ants/pull/111.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/111.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/111"",""number"":111,""state""
[...]
+274,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/114"",""id"":502102437,""node_id"":""MDExOlB1bGxSZXF1ZXN0NTAyMTAyNDM3"",""html_url"":""https://github.com/panjf2000/ants/pull/114"",""diff_url"":""https://github.com/panjf2000/ants/pull/114.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/114.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/114"",""number"":114,""state""
[...]
+275,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/117"",""id"":505486248,""node_id"":""MDExOlB1bGxSZXF1ZXN0NTA1NDg2MjQ4"",""html_url"":""https://github.com/panjf2000/ants/pull/117"",""diff_url"":""https://github.com/panjf2000/ants/pull/117.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/117.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/117"",""number"":117,""state""
[...]
+276,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/131"",""id"":543900177,""node_id"":""MDExOlB1bGxSZXF1ZXN0NTQzOTAwMTc3"",""html_url"":""https://github.com/panjf2000/ants/pull/131"",""diff_url"":""https://github.com/panjf2000/ants/pull/131.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/131.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/131"",""number"":131,""state""
[...]
+277,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/136"",""id"":582870188,""node_id"":""MDExOlB1bGxSZXF1ZXN0NTgyODcwMTg4"",""html_url"":""https://github.com/panjf2000/ants/pull/136"",""diff_url"":""https://github.com/panjf2000/ants/pull/136.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/136.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/136"",""number"":136,""state""
[...]
+278,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/139"",""id"":586207150,""node_id"":""MDExOlB1bGxSZXF1ZXN0NTg2MjA3MTUw"",""html_url"":""https://github.com/panjf2000/ants/pull/139"",""diff_url"":""https://github.com/panjf2000/ants/pull/139.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/139.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/139"",""number"":139,""state""
[...]
+279,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/149"",""id"":607755003,""node_id"":""MDExOlB1bGxSZXF1ZXN0NjA3NzU1MDAz"",""html_url"":""https://github.com/panjf2000/ants/pull/149"",""diff_url"":""https://github.com/panjf2000/ants/pull/149.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/149.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/149"",""number"":149,""state""
[...]
+280,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/158"",""id"":654684379,""node_id"":""MDExOlB1bGxSZXF1ZXN0NjU0Njg0Mzc5"",""html_url"":""https://github.com/panjf2000/ants/pull/158"",""diff_url"":""https://github.com/panjf2000/ants/pull/158.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/158.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/158"",""number"":158,""state""
[...]
+281,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/167"",""id"":669972849,""node_id"":""MDExOlB1bGxSZXF1ZXN0NjY5OTcyODQ5"",""html_url"":""https://github.com/panjf2000/ants/pull/167"",""diff_url"":""https://github.com/panjf2000/ants/pull/167.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/167.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/167"",""number"":167,""state""
[...]
+282,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/172"",""id"":686947632,""node_id"":""MDExOlB1bGxSZXF1ZXN0Njg2OTQ3NjMy"",""html_url"":""https://github.com/panjf2000/ants/pull/172"",""diff_url"":""https://github.com/panjf2000/ants/pull/172.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/172.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/172"",""number"":172,""state""
[...]
+283,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/174"",""id"":693963625,""node_id"":""MDExOlB1bGxSZXF1ZXN0NjkzOTYzNjI1"",""html_url"":""https://github.com/panjf2000/ants/pull/174"",""diff_url"":""https://github.com/panjf2000/ants/pull/174.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/174.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/174"",""number"":174,""state""
[...]
+284,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/176"",""id"":696437287,""node_id"":""MDExOlB1bGxSZXF1ZXN0Njk2NDM3Mjg3"",""html_url"":""https://github.com/panjf2000/ants/pull/176"",""diff_url"":""https://github.com/panjf2000/ants/pull/176.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/176.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/176"",""number"":176,""state""
[...]
+285,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/184"",""id"":731946063,""node_id"":""MDExOlB1bGxSZXF1ZXN0NzMxOTQ2MDYz"",""html_url"":""https://github.com/panjf2000/ants/pull/184"",""diff_url"":""https://github.com/panjf2000/ants/pull/184.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/184.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/184"",""number"":184,""state""
[...]
+286,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/185"",""id"":736936308,""node_id"":""PR_kwDOB_z1Gs4r7MF0"",""html_url"":""https://github.com/panjf2000/ants/pull/185"",""diff_url"":""https://github.com/panjf2000/ants/pull/185.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/185.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/185"",""number"":185,""state"":""closed"","
[...]
+287,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/186"",""id"":742901118,""node_id"":""PR_kwDOB_z1Gs4sR8V-"",""html_url"":""https://github.com/panjf2000/ants/pull/186"",""diff_url"":""https://github.com/panjf2000/ants/pull/186.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/186.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/186"",""number"":186,""state"":""closed"","
[...]
+288,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/189"",""id"":757412327,""node_id"":""PR_kwDOB_z1Gs4tJTHn"",""html_url"":""https://github.com/panjf2000/ants/pull/189"",""diff_url"":""https://github.com/panjf2000/ants/pull/189.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/189.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/189"",""number"":189,""state"":""closed"","
[...]
+289,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/192"",""id"":763816683,""node_id"":""PR_kwDOB_z1Gs4thurr"",""html_url"":""https://github.com/panjf2000/ants/pull/192"",""diff_url"":""https://github.com/panjf2000/ants/pull/192.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/192.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/192"",""number"":192,""state"":""closed"","
[...]
+290,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/193"",""id"":770998086,""node_id"":""PR_kwDOB_z1Gs4t9H9G"",""html_url"":""https://github.com/panjf2000/ants/pull/193"",""diff_url"":""https://github.com/panjf2000/ants/pull/193.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/193.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/193"",""number"":193,""state"":""closed"","
[...]
+291,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/198"",""id"":791490205,""node_id"":""PR_kwDOB_z1Gs4vLS6d"",""html_url"":""https://github.com/panjf2000/ants/pull/198"",""diff_url"":""https://github.com/panjf2000/ants/pull/198.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/198.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/198"",""number"":198,""state"":""closed"","
[...]
+292,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/206"",""id"":816835878,""node_id"":""PR_kwDOB_z1Gs4wr-0m"",""html_url"":""https://github.com/panjf2000/ants/pull/206"",""diff_url"":""https://github.com/panjf2000/ants/pull/206.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/206.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/206"",""number"":206,""state"":""closed"","
[...]
+293,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/210"",""id"":835038436,""node_id"":""PR_kwDOB_z1Gs4xxazk"",""html_url"":""https://github.com/panjf2000/ants/pull/210"",""diff_url"":""https://github.com/panjf2000/ants/pull/210.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/210.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/210"",""number"":210,""state"":""closed"","
[...]
+294,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/211"",""id"":842184289,""node_id"":""PR_kwDOB_z1Gs4yMrZh"",""html_url"":""https://github.com/panjf2000/ants/pull/211"",""diff_url"":""https://github.com/panjf2000/ants/pull/211.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/211.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/211"",""number"":211,""state"":""open"",""l
[...]
diff --git
a/plugins/github/e2e/snapshot_tables/_tool_github_pull_request_labels.csv
b/plugins/github/e2e/snapshot_tables/_tool_github_pull_request_labels.csv
new file mode 100644
index 00000000..6ce2a7ab
--- /dev/null
+++ b/plugins/github/e2e/snapshot_tables/_tool_github_pull_request_labels.csv
@@ -0,0 +1,35 @@
+connection_id,pull_id,label_name
+1,203756736,enhancement
+1,211603583,bug
+1,308859272,enhancement
+1,325179595,enhancement
+1,325179595,pending merged
+1,379435034,pending merged
+1,410487606,doc
+1,415925259,invalid
+1,415925259,waiting for response
+1,452382525,pending merged
+1,475457581,enhancement
+1,475457581,pending merged
+1,496172205,waiting for response
+1,502102437,bug
+1,502102437,pending merged
+1,505486248,invalid
+1,505486248,waiting for response
+1,543900177,doc
+1,543900177,long-term
+1,543900177,pending development
+1,543900177,waiting for response
+1,586207150,invalid
+1,586207150,waiting for response
+1,607755003,invalid
+1,607755003,proposal
+1,607755003,waiting for response
+1,607755003,wontfix
+1,654684379,invalid
+1,654684379,waiting for response
+1,686947632,pending merged
+1,696437287,waiting for response
+1,742901118,pending merged
+1,757412327,doc
+1,757412327,pending merged
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv
b/plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv
new file mode 100644
index 00000000..ee97a096
--- /dev/null
+++ b/plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv
@@ -0,0 +1,50 @@
+connection_id,github_id,repo_id,number,state,title,github_created_at,github_updated_at,closed_at,additions,deletions,comments,commits,review_comments,merged,merged_at,body,type,component,merge_commit_sha,head_ref,base_ref,base_commit_sha,head_commit_sha,url,author_name,author_id,_raw_data_params,_raw_data_table,_raw_data_id,_raw_data_remark
+1,203756736,134018330,4,closed,pre-allocate the capacity of the worker
list,2018-07-25T08:19:30.000+00:00,2018-08-29T04:11:46.000+00:00,2018-07-26T02:32:41.000+00:00,0,0,0,0,0,0,2018-07-26T02:32:41.000+00:00,"""fix
#3 \r\n* 链表实际测过, 性能相差无几, 但内存占用高了几倍\r\n* 初始化`Pool`和`PoolFunc`是给定了个默认的worker
capacity\r\n*
优化了下其他代码""",,,3ddd58c390b0f928a5782c235f90ad0c9c21312c,pre_allocate,master,f5b37d0798a8e4c6780a1e08270fa50e979aa1d7,83042d709562a53973c78901ca5df7e7cddbe677,https://github.com/panjf2000/an
[...]
+1,211603583,134018330,8,closed,fix goroutine
leak,2018-08-29T01:35:54.000+00:00,2018-10-30T00:12:13.000+00:00,2018-10-30T00:12:13.000+00:00,0,0,0,0,0,0,,"""n++,
will cause workers[0]
leak""",,,74ba726f34abe487b7defac6bb9bebf24d342377,dev,master,666635c65d8d3bb1223b819325e0bd23c81f2733,afd687164b13280199208ec4869709edcf02b52d,https://github.com/panjf2000/ants/pull/8,hongli-my,8597823,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,247,
+1,212277907,134018330,9,closed,Update
pool.go,2018-08-31T05:29:36.000+00:00,2018-08-31T13:40:33.000+00:00,2018-08-31T13:40:33.000+00:00,0,0,0,0,0,0,,"""#活着的孩子不想当孤儿\r\n\tHopefully:\r\n\tchildren
:= []*child{C1,C2,C3,C4,C5,C6,C7}\r\n\tIn fact:\r\n\tchildren :=
[]*child{C1,C4,C2,C3,C5,C6,C7}""",,,f14d3f91f68d0bc23fe42aa413e98005f6575045,patch-1,master,666635c65d8d3bb1223b819325e0bd23c81f2733,2726d42ea62857283ee73ef3611e379b60974ad2,https://github.com/panjf2000/ants/pull/9,Nonnnnnnnnn,428082
[...]
+1,216254598,134018330,11,closed,graceful
exit,2018-09-18T10:15:01.000+00:00,2018-12-03T03:52:35.000+00:00,2018-12-03T03:52:35.000+00:00,0,0,0,0,0,0,,"""graceful
exit""",,,6a87067eb3d6440e5db17f31d4bc12ac291633f4,master,develop,833b6e29acfb2f16e3cf7fc92c79763847c319f4,a03eccc794870f0a2e55a5cb8344ea47f2a0001d,https://github.com/panjf2000/ants/pull/11,shanhuhai5739,3794113,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,249,
+1,218939809,134018330,13,closed,解决死循环导致cpu占用率过高,2018-09-28T11:37:28.000+00:00,2018-09-29T11:29:54.000+00:00,2018-09-29T11:29:54.000+00:00,0,0,0,0,0,0,2018-09-29T11:29:54.000+00:00,"""使用了cond
条件变量来阻塞Submit
goroutine。潘少,你再仔细琢磨琢磨,看下有何不妥?""",,,9a3b5cd25344822bca7684f87d9e123890a7bf59,master,master,af376f1b7b59dc488458bcecd4273f0fcde33c55,1846b4392a3a20e6bf1a7431b67f86bd43e0f0b9,https://github.com/panjf2000/ants/pull/13,liyonglion,12890888,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo""
[...]
+1,219363161,134018330,14,closed,Remove meaningless if
statements,2018-10-01T12:48:11.000+00:00,2018-10-02T13:52:27.000+00:00,2018-10-02T13:52:27.000+00:00,0,0,0,0,0,0,2018-10-02T13:52:27.000+00:00,"""""",,,29730bb70343924a2f56a13a9799611dd1cd27fd,master,master,1b62696050b7030106291980d5220f886b017eff,5ed168767a771e3802252020b9821610380ed1a4,https://github.com/panjf2000/ants/pull/14,SimePel,20608155,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requ
[...]
+1,219936521,134018330,15,closed,Fixes to benchmarks and added semaphore
comparison,2018-10-03T07:16:16.000+00:00,2018-10-03T12:38:57.000+00:00,2018-10-03T12:33:59.000+00:00,0,0,0,0,0,0,2018-10-03T12:33:59.000+00:00,"""Benchmark
results with Param=0, as time.Sleep is not stable on Windows\r\n\r\nAlso Go
1.11 has bunch of improvements:\r\n\r\n```\r\ngoos: windows\r\ngoarch:
amd64\r\npkg: github.com/panjf2000/ants\r\nBenchmarkGoroutineWithFunc-8
1 3530220300 ns/op [...]
+1,222703171,134018330,16,closed,bugfix(check max pool
size),2018-10-14T09:21:41.000+00:00,2018-12-03T03:53:31.000+00:00,2018-12-03T03:53:31.000+00:00,0,0,0,0,0,0,,"""if
you limit max goroutine to math.Maxint32 as your code `int32(pool size)`\r\nI
think should check max Goroutine size, otherwise size overflow to
negative?\r\n""",,,1399cfa28f6751f769a985206daecb56a08b2de9,bugfix_check_max_pool_size,master,711dbdb7a222771ce15aaee1bb7b7c6e9731f208,439348b027031c793e54669fcd74eb4964c15055,ht
[...]
+1,231840723,134018330,19,closed,Possible memory leak because of
Ticker,2018-11-19T03:03:09.000+00:00,2018-12-01T15:49:32.000+00:00,2018-12-01T15:49:32.000+00:00,0,0,0,0,0,0,2018-12-01T15:49:32.000+00:00,"""//
NewTicker returns a new Ticker containing a channel that will send the\r\n//
time with a period specified by the duration argument.\r\n// It adjusts the
intervals or drops ticks to make up for slow receivers.\r\n// The duration d
must be greater than zero; if not, NewTicker will pan [...]
+1,246250598,134018330,23,closed,feature: add
PanicHandler,2019-01-21T10:58:15.000+00:00,2019-01-22T05:41:34.000+00:00,2019-01-22T05:41:34.000+00:00,0,0,0,0,0,0,2019-01-22T05:41:34.000+00:00,"""@panjf2000
PTAL\r\nFix #22 \r\nSigned-off-by: Cholerae Hu
<[email protected]>""",,,9158bd37025ccdd29d6346a6639a282e0060c7e2,panichandler,master,812dd4e01075be3cf97429a43abaf6837908cdcd,5bbc9e170bbee27c37bcc30da3da75b4531d1edb,https://github.com/panjf2000/ants/pull/23,choleraehyq,8923413,"{""Con
[...]
+1,267414275,134018330,30,closed,goreport: lint warning on code comment
structure,2019-04-04T11:52:48.000+00:00,2019-04-23T11:11:58.000+00:00,2019-04-23T11:11:58.000+00:00,0,0,0,0,0,0,2019-04-23T11:11:58.000+00:00,"""Added
a newline between group comment and exported variable line
😄""",,,dec04010834ccd3691eb1776045ce3b9310ce26c,patch-1,master,4ae3fb8dc413492862469027bb58cb45b77338f1,ec5d1f3b8107265cb53536975504c7cda4f6d68f,https://github.com/panjf2000/ants/pull/30,sarathsp06,964542,"{""Co
[...]
+1,292246524,134018330,36,closed,handle job
panic,2019-06-27T03:27:05.000+00:00,2019-08-17T20:32:55.000+00:00,2019-08-17T20:32:34.000+00:00,0,0,0,0,0,0,,"""""",,,95e11bf85f18a80197918d15a19ec10f41903d63,master,master,05e96abd6103ae7b70436abe58dbc0ad7e740929,39f04c6e65b76b5f20abd3ca0606db4cd038e5c2,https://github.com/panjf2000/ants/pull/36,king526,38849208,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,257,
+1,300598936,134018330,39,closed,优化清理速度并修复内存泄漏,2019-07-24T07:41:02.000+00:00,2019-07-26T04:00:12.000+00:00,2019-07-26T04:00:12.000+00:00,0,0,0,0,0,0,2019-07-26T04:00:12.000+00:00,"""""",,,21a109c7f0873c8f466d6710de23474968940011,master,master,fc48d32604efc2b36d144b8f83d34c1aa1fda1c9,b44a12884b495713a44f796981267ed87134decb,https://github.com/panjf2000/ants/pull/39,wwjiang,1290360,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,258,
+1,301421607,134018330,40,closed,"optimize memory allocation, change the
default pool param and add the log of panic
stack.",2019-07-26T07:07:06.000+00:00,2019-07-26T15:22:26.000+00:00,2019-07-26T15:22:26.000+00:00,0,0,0,0,0,0,2019-07-26T15:22:26.000+00:00,"""Hi,
I am using it on my online server which almost need 5 million goroutines on
each go service.\r\nI'm divided into 10 small pools, because a pool of five
million will slow down the speed associated with the slice.\r\nI made some sm
[...]
+1,308859272,134018330,41,closed,support nonblocking submit and max blocking
limit
setting,2019-08-20T03:24:27.000+00:00,2019-08-20T11:52:19.000+00:00,2019-08-20T10:55:19.000+00:00,0,0,0,0,0,0,2019-08-20T10:55:19.000+00:00,"""Signed-off-by:
Cholerae Hu
<[email protected]>""",,,faef79b7d8a4876da8a215d7794cce20c710aaa2,nonblocking,master,dc8169d5c2645bfc507d6993b7d215326300f31b,58466b12b03a603d9f0331bbcc64a7557b27865d,https://github.com/panjf2000/ants/pull/41,choleraehyq,8923413,"{""Con
[...]
+1,311420898,134018330,48,closed,Create
CODE_OF_CONDUCT.md,2019-08-27T14:44:03.000+00:00,2019-08-28T05:30:30.000+00:00,2019-08-27T14:46:22.000+00:00,0,0,0,0,0,0,2019-08-27T14:46:22.000+00:00,"""""",,,d5eded45bffe827e5a64a3376c4b94f08b641031,add-code-of-conduct-1,master,44aec9954f58987c37d5937ba590bbf0812a32de,bba6c12b60eff3445adcc168fff3bfdcad9e2571,https://github.com/panjf2000/ants/pull/48,panjf2000,7496278,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_
[...]
+1,316337433,134018330,51,closed,Invoke decRunning() when revertWorker()
returns
false,2019-09-11T08:46:23.000+00:00,2019-09-12T01:00:32.000+00:00,2019-09-12T01:00:32.000+00:00,0,0,0,0,0,0,2019-09-12T01:00:32.000+00:00,"""Signed-off-by:
Cholerae Hu <[email protected]>\r\n\r\n---\r\nname: Pull request\r\nabout:
Propose changes to the code\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most [...]
+1,325179595,134018330,53,closed,add loop queue
,2019-10-07T08:17:20.000+00:00,2019-12-26T01:44:41.000+00:00,2019-10-09T16:59:19.000+00:00,0,0,0,0,0,0,2019-10-09T16:59:19.000+00:00,"""---\r\nname:
Pull request\r\nabout: 抽象出worker队列的实现,使用原先和循环队列实现这个接口\r\ntitle: ''\r\nlabels:
''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`!
Please fill this out to help us make the most of your pull request.\r\n\r\nWas
this change discussed in an issue first? That can help save [...]
+1,329127652,134018330,54,closed,throw out default
panic,2019-10-17T08:18:41.000+00:00,2019-10-19T05:55:20.000+00:00,2019-10-18T02:07:14.000+00:00,0,0,0,0,0,0,,"""<the
Go programming language>\r\n5.10. Recover\r\nRecovering indiscriminately from
panics is a dubious practice because the state of a package’s variables after a
panic is rarely well defined or documented. Perhaps a critical update to a data
structure was incomplete, a file or net work connection was opened but not
closed, or a [...]
+1,346931859,134018330,66,closed,Refine the indentation of the sample code in
READMEs,2019-11-29T07:50:17.000+00:00,2019-11-29T07:57:46.000+00:00,2019-11-29T07:52:04.000+00:00,0,0,0,0,0,0,,"""""",,,1acafed7740d0daf1dcc3a30129798f59c234331,master,master,fd3841dd88c15fcc0e0ea94e606d980221ac5e09,b19edbd7b909527b2cc2a759e7a60133497f9dee,https://github.com/panjf2000/ants/pull/66,RealLiuSha,5715152,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,265,
+1,379435034,134018330,79,closed,Fix a bug that doesn't release
lock,2020-02-25T08:30:05.000+00:00,2020-05-07T16:12:40.000+00:00,2020-02-26T03:15:03.000+00:00,0,0,0,0,0,0,2020-02-26T03:15:03.000+00:00,"""err!=nil时未释放锁,使用defer
p.lock.Unlock()修复\r\n\r\n---\r\nname: Pull request\r\nabout: Propose changes
to the code\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\ [...]
+1,404931293,134018330,87,closed,fix:v2 dir not
exist,2020-04-17T05:34:28.000+00:00,2020-04-19T03:03:07.000+00:00,2020-04-19T03:03:07.000+00:00,0,0,0,0,0,0,,"""---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle: ''\r\nlabels:
''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`!
Please fill this out to help us make the most of your pull request.\r\n\r\nWas
this change discussed in an issue first? That can help save time in case the
change is [...]
+1,410487606,134018330,89,closed,Fix indent on
README,2020-04-29T04:51:26.000+00:00,2020-06-22T13:58:37.000+00:00,2020-04-29T07:08:43.000+00:00,0,0,0,0,0,0,2020-04-29T07:08:43.000+00:00,"""---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle: 'Fix
indent'\r\nlabels: ''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for
contributing to `ants`! Please fill this out to help us make the most of your
pull request.\r\n\r\nWas this change discussed in an issue first? That c [...]
+1,415925259,134018330,91,closed,支持配置workerChanCap大小,2020-05-11T07:40:41.000+00:00,2020-05-11T10:15:54.000+00:00,2020-05-11T09:27:30.000+00:00,0,0,0,0,0,0,,"""---\r\nname:
Pull request\r\nabout: support customize workerChanCap \r\ntitle:
''\r\nlabels: ''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for
contributing to `ants`! Please fill this out to help us make the most of your
pull request.\r\n\r\nWas this change discussed in an issue first? That can help
save time in case the chang [...]
+1,452382525,134018330,100,closed,chore: support
go1.14,2020-07-19T06:38:38.000+00:00,2020-07-19T15:00:14.000+00:00,2020-07-19T14:59:48.000+00:00,0,0,0,0,0,0,2020-07-19T14:59:48.000+00:00,"""as
title.""",,,0a7be73d35726850863a80432dec0ac5c78cdfb4,patch,master,b2666199751ef4fe666c175ba667d18a182b67e0,18623ceb17a9230484ff5d1a31c3beb0b631a2f3,https://github.com/panjf2000/ants/pull/100,appleboy,21979,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,270,
+1,461992435,134018330,103,closed,Add a Gitter chat badge to
README.md,2020-08-03T07:12:25.000+00:00,2020-08-03T07:17:52.000+00:00,2020-08-03T07:17:52.000+00:00,0,0,0,0,0,0,,"""###
panjf2000/ants now has a Chat Room on Gitter\n\n@panjf2000 has just created a
chat room. You can visit it here:
[https://gitter.im/ants-pool/ants](https://gitter.im/ants-pool/ants?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&content=body_link).\n\nThis
pull-request adds this badge to your README.md:\ [...]
+1,475457581,134018330,107,closed,Avoid memory
leak,2020-08-28T15:02:33.000+00:00,2020-08-29T10:51:57.000+00:00,2020-08-29T10:51:57.000+00:00,0,0,0,0,0,0,2020-08-29T10:51:57.000+00:00,"""---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle: 'avoid memory
leaky'\r\nlabels: 'gc'\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for
contributing to `ants`! Please fill this out to help us make the most of your
pull request.\r\n\r\nWas this change discussed in an issue first [...]
+1,496172205,134018330,111,closed,Remove underscore from file
names,2020-10-01T11:08:20.000+00:00,2020-10-04T07:42:53.000+00:00,2020-10-04T07:42:53.000+00:00,0,0,0,0,0,0,,"""\r\n##
1. Are you opening this pull request for bug-fixes, optimizations, or new
features?\r\nFixing the file naming convention based on
[this](https://golang.org/doc/effective_go.html#package-names).\r\n\r\n## 2.
Please describe how these code changes achieve your intention.\r\nThere is no
code change\r\n\r\n\r\n\r\n [...]
+1,502102437,134018330,114,closed,fix: Memory
leak,2020-10-13T08:37:37.000+00:00,2020-10-15T12:22:42.000+00:00,2020-10-15T03:35:56.000+00:00,0,0,0,0,0,0,2020-10-15T03:35:56.000+00:00,"""Fixes
#113""",,,94a7a7f1cb3a11fcaaf9608c94fe1dc0bcd98ab0,master,master,ef6017217221e20416d886c0231dd5134752ef4e,00691c648a5b7d28dba5bcafa05d9bbccdf4d933,https://github.com/panjf2000/ants/pull/114,Mutated1994,29589055,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requ
[...]
+1,505486248,134018330,117,closed,fix set negative
size,2020-10-18T14:58:12.000+00:00,2020-10-19T01:58:45.000+00:00,2020-10-19T01:58:45.000+00:00,0,0,0,0,0,0,,"""fix
set negative size for
pool\r\n""",,,55d7f5eb6298d59b76a26b56d1bbb776503a8563,hotfix-poolsize,master,94a7a7f1cb3a11fcaaf9608c94fe1dc0bcd98ab0,05a3664dbf966f1a7ced274aaf47d34e644287ef,https://github.com/panjf2000/ants/pull/117,imxyb,7411249,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_re
[...]
+1,543900177,134018330,131,closed,Add go1.15.x support on
CI,2020-12-22T06:25:18.000+00:00,2021-03-19T02:15:23.000+00:00,2021-03-19T02:15:23.000+00:00,0,0,0,0,0,0,,"""Add
go1.15.x support on
CI""",,,545d5f0c007d1d5e2cd23ae2d9074365c0f03790,patch-1,master,fd8d670fd09489e6ea7693c0a382ba85d2694f16,15cb2705734c62544ac5dca0de3f28f03a69a854,https://github.com/panjf2000/ants/pull/131,kaiiak,2832687,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,276,
+1,582870188,134018330,136,closed,Change the writing of
if...err,2021-03-02T09:24:36.000+00:00,2021-03-11T02:27:15.000+00:00,2021-03-11T02:27:15.000+00:00,0,0,0,0,0,0,,"""---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle: ''\r\nlabels:
''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`!
Please fill this out to help us make the most of your pull request.\r\n\r\nWas
this change discussed in an issue first? That can help save time in case th
[...]
+1,586207150,134018330,139,closed,The program should return directly when the
pool size passed in when
…,2021-03-07T08:00:46.000+00:00,2021-03-12T12:45:57.000+00:00,2021-03-12T12:45:57.000+00:00,0,0,0,0,0,0,,"""…calling
the NewPool interface is less than or equal to 0\r\n\r\n---\r\nname: Pull
request\r\nabout: Propose changes to the code\r\ntitle: 'code
improve'\r\n---\r\n""",,,9a4288b9368ab4551d967fddda163d6be2182fde,feature/zhangyuanxue/dev,master,fd8d670fd09489e6ea7693c0a382ba85d2694f1
[...]
+1,607755003,134018330,149,closed,pool_list,2021-04-02T01:16:21.000+00:00,2021-04-02T05:28:23.000+00:00,2021-04-02T04:09:52.000+00:00,0,0,0,0,0,0,,"""sequence""",,,fd1b0378ee9b60fe32a2fe5c8198a427e5f46949,pool_list,master,dbcb6a104f23b1a6a7521796b30515230353283e,674fe08bb2c2ced275600ebdddf2412c84e2c349,https://github.com/panjf2000/ants/pull/149,yddeng,41562937,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,279,
+1,654684379,134018330,158,open,Submit a task with args to
pool,2021-05-27T08:53:42.000+00:00,2022-02-22T16:48:28.000+00:00,,0,0,0,0,0,0,,"""---\r\nname:
Resolve problem with args capturing\r\n---\r\n\r\n<!--\r\nThank you for
contributing to `ants`! Please fill this out to help us make the most of your
pull request.\r\n\r\nWas this change discussed in an issue first? That can help
save time in case the change is not a good fit for the project. Not all pull
requests get merged.\r\n\r\nIt i [...]
+1,669972849,134018330,167,open,allow NewPoolWithFunc can invoke with nil
argument,2021-06-15T00:57:34.000+00:00,2022-02-22T16:48:28.000+00:00,,0,0,0,0,0,0,,"""2.
abstract a Task interface for SubmitTask which is more
convenient\r\n\r\n---\r\nname: Pull request\r\nabout: Propose changes to the
code\r\ntitle: 'allow NewPoolWithFunc can invoke with nil argument'\r\nlabels:
''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`!
Please fill this out to help us make th [...]
+1,686947632,134018330,172,closed,Timing issue in the
TestNonblockingSubmitWithFunc,2021-07-09T17:43:56.000+00:00,2021-07-12T14:59:39.000+00:00,2021-07-12T14:52:47.000+00:00,0,0,0,0,0,0,2021-07-12T14:52:47.000+00:00,"""On
some machines this unit would fail due to a timing issue. Since the Invoke in
the loop was using nil as the param, it would (depending on timing) lead to the
workers finishing the (w *goWorkerWithFunc) run() in the range loop over
w.args as args would == nil and return [...]
+1,693963625,134018330,174,closed,Fix CI workflow to make the cache action
really
work,2021-07-21T00:56:19.000+00:00,2021-07-21T03:29:35.000+00:00,2021-07-21T03:21:49.000+00:00,0,0,0,0,0,0,2021-07-21T03:21:49.000+00:00,"""workflows
add cache mod file\r\nworkflows should be restore cache before unit
test\r\nlink
[actions/cache](https://github.com/marketplace/actions/cache)\r\n---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle:
'workflows'\r\nlabels: 'workflows'\r\nass [...]
+1,696437287,134018330,176,open,feat: goroutine exits
immediately,2021-07-25T03:44:37.000+00:00,2022-02-22T16:48:28.000+00:00,,0,0,0,0,0,0,,"""---\r\nname:
goroutine exits immediately\r\nabout: goroutine exits immediately, lazy init
defaultAntsPool\r\ntitle: 'goroutine exits immediately'\r\nlabels:
''\r\nassignees: 'panjf2000'\r\n---\r\n\r\n<!--\r\nThank you for contributing
to `ants`! Please fill this out to help us make the most of your pull
request.\r\n\r\nWas this change discussed in [...]
+1,731946063,134018330,184,closed,style: fixed some typos in the
comments,2021-09-11T15:06:25.000+00:00,2021-09-13T03:57:28.000+00:00,2021-09-13T03:57:25.000+00:00,0,0,0,0,0,0,2021-09-13T03:57:25.000+00:00,"""---\r\nname:
Pull request\r\nabout: typos in comments\r\ntitle: fixed some typos in the
comments\r\nlabels: \r\nassignees: @panjf2000 \r\n---\r\n\r\n<!--\r\nThank you
for contributing to `ants`! Please fill this out to help us make the most of
your pull request.\r\n\r\nWas this chang [...]
+1,736936308,134018330,185,closed,Update the link of one of the relevant
articles,2021-09-18T17:06:03.000+00:00,2021-09-19T17:24:49.000+00:00,2021-09-19T02:56:40.000+00:00,0,0,0,0,0,0,2021-09-19T02:56:40.000+00:00,"""Hello!
I never got the chance to mention it before, but thank you for linking one of
my articles in your repository :) \r\n\r\n## 1. Are you opening this pull
request for bug-fixs, optimizations or new feature?\r\nNo\r\n\r\n\r\n## 2.
Please describe how these code changes ach [...]
+1,742901118,134018330,186,closed,Update the link of one of the relevant
articles,2021-09-26T15:53:39.000+00:00,2021-09-27T03:44:34.000+00:00,2021-09-27T02:38:55.000+00:00,0,0,0,0,0,0,2021-09-27T02:38:55.000+00:00,"""re:
#185\r\n\r\nMissed the `README_ZH.md` file 😅
""",,,3f9c4cd54898e7149c7f6d072213b8fdbd0036d8,patch-1,master,61d120b6f086998184f402a83ace485a036d4c7d,41f6b572b25da6363d7d7c45b77705fd8bee7466,https://github.com/panjf2000/ants/pull/186,TwiN,15699766,"{""ConnectionId"":1,""Own
[...]
+1,757412327,134018330,189,closed,add shopify into user
cases,2021-10-13T13:34:05.000+00:00,2021-10-13T13:42:53.000+00:00,2021-10-13T13:42:42.000+00:00,0,0,0,0,0,0,2021-10-13T13:42:42.000+00:00,"""Fixes
https://github.com/panjf2000/ants/issues/188""",,,76ce0ce24f21b1dd13050e0c84b07ce55e68f111,add-shopify-as-user-case,master,3f9c4cd54898e7149c7f6d072213b8fdbd0036d8,efe0bad6c0ab13b54d00909864e34a1060e41d6e,https://github.com/panjf2000/ants/pull/189,lilien1010,3814966,"{""ConnectionId"":1,""
[...]
+1,763816683,134018330,192,closed,add more test about
spinlock,2021-10-22T02:53:44.000+00:00,2021-11-27T13:44:28.000+00:00,2021-11-27T13:44:28.000+00:00,0,0,0,0,0,0,,"""---\r\nname:
Pull request\r\nabout: add more test about spinlock\r\ntitle: ''\r\nlabels:
''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`!
Please fill this out to help us make the most of your pull request.\r\n\r\nWas
this change discussed in an issue first? That can help save time in case t [...]
+1,770998086,134018330,193,closed,Replace goto with simple for
loop,2021-11-02T00:36:11.000+00:00,2021-11-18T14:44:47.000+00:00,2021-11-18T14:44:40.000+00:00,0,0,0,0,0,0,,"""---\r\nname:
Pull request\r\nabout: Replace goto with simple for loop\r\ntitle: 'Replace
goto with simple for loop'\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue [...]
+1,791490205,134018330,198,closed,optimize: calculating mid in binary
search,2021-11-30T09:34:02.000+00:00,2021-12-01T00:42:16.000+00:00,2021-12-01T00:42:16.000+00:00,0,0,0,0,0,0,,"""---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle: ''\r\nlabels:
''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`!
Please fill this out to help us make the most of your pull request.\r\n\r\nWas
this change discussed in an issue first? That can help save tim [...]
+1,816835878,134018330,206,closed,Add binarysearch of loop
queue,2022-01-08T10:06:36.000+00:00,2022-01-31T02:49:04.000+00:00,2022-01-31T02:49:03.000+00:00,0,0,0,0,0,0,2022-01-31T02:49:03.000+00:00,"""---\r\nname:
Pull request\r\nabout: Add binarysearch method to loop_queue to get expired
workers, just like worker_stack.\r\ntitle: ''\r\nlabels: ''\r\nassignees:
'bright2227'\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please
fill this out to help us make the most of your pu [...]
+1,835038436,134018330,210,closed,Awake the blocking callers when Tune(size
int) is invoked to expand the
pool,2022-01-29T08:01:24.000+00:00,2022-04-14T17:31:43.000+00:00,2022-02-14T13:51:41.000+00:00,0,0,0,0,0,0,2022-02-14T13:51:40.000+00:00,"""…capacity\r\n\r\n---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle: 'Instantly scale
up capacity when using Tune(size int) to enlarge the capacity'\r\nlabels:
'enhancement'\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you fo [...]
+1,842184289,134018330,211,open,Remove worker_func.go and modify pool_func.go
simplifying the
library,2022-02-07T21:31:30.000+00:00,2022-02-22T16:48:28.000+00:00,,0,0,0,0,0,0,,"""---\r\nname:
Remove worker_func.go and modify pool_func.go simplifying the
library\r\nabout: Remove worker_func.go and modify pool_func.go to simply
utilize the non-func pool+worker implementation\r\ntitle: 'Remove
worker_func.go and modify pool_func.go simplifying the library'\r\nlabels:
''\r\nassignees: @panjf2 [...]
diff --git a/plugins/github/e2e/snapshot_tables/pull_request_labels.csv
b/plugins/github/e2e/snapshot_tables/pull_request_labels.csv
new file mode 100644
index 00000000..1b363529
--- /dev/null
+++ b/plugins/github/e2e/snapshot_tables/pull_request_labels.csv
@@ -0,0 +1,35 @@
+pull_request_id,label_name
+gitlab:GithubPullRequest:1:203756736,enhancement
+gitlab:GithubPullRequest:1:211603583,bug
+gitlab:GithubPullRequest:1:308859272,enhancement
+gitlab:GithubPullRequest:1:325179595,enhancement
+gitlab:GithubPullRequest:1:325179595,pending merged
+gitlab:GithubPullRequest:1:379435034,pending merged
+gitlab:GithubPullRequest:1:410487606,doc
+gitlab:GithubPullRequest:1:415925259,invalid
+gitlab:GithubPullRequest:1:415925259,waiting for response
+gitlab:GithubPullRequest:1:452382525,pending merged
+gitlab:GithubPullRequest:1:475457581,enhancement
+gitlab:GithubPullRequest:1:475457581,pending merged
+gitlab:GithubPullRequest:1:496172205,waiting for response
+gitlab:GithubPullRequest:1:502102437,bug
+gitlab:GithubPullRequest:1:502102437,pending merged
+gitlab:GithubPullRequest:1:505486248,invalid
+gitlab:GithubPullRequest:1:505486248,waiting for response
+gitlab:GithubPullRequest:1:543900177,doc
+gitlab:GithubPullRequest:1:543900177,long-term
+gitlab:GithubPullRequest:1:543900177,pending development
+gitlab:GithubPullRequest:1:543900177,waiting for response
+gitlab:GithubPullRequest:1:586207150,invalid
+gitlab:GithubPullRequest:1:586207150,waiting for response
+gitlab:GithubPullRequest:1:607755003,invalid
+gitlab:GithubPullRequest:1:607755003,proposal
+gitlab:GithubPullRequest:1:607755003,waiting for response
+gitlab:GithubPullRequest:1:607755003,wontfix
+gitlab:GithubPullRequest:1:654684379,invalid
+gitlab:GithubPullRequest:1:654684379,waiting for response
+gitlab:GithubPullRequest:1:686947632,pending merged
+gitlab:GithubPullRequest:1:696437287,waiting for response
+gitlab:GithubPullRequest:1:742901118,pending merged
+gitlab:GithubPullRequest:1:757412327,doc
+gitlab:GithubPullRequest:1:757412327,pending merged
diff --git a/plugins/github/e2e/snapshot_tables/pull_requests.csv
b/plugins/github/e2e/snapshot_tables/pull_requests.csv
new file mode 100644
index 00000000..263b00bd
--- /dev/null
+++ b/plugins/github/e2e/snapshot_tables/pull_requests.csv
@@ -0,0 +1,50 @@
+id,base_repo_id,head_repo_id,status,title,description,url,author_name,author_id,parent_pr_id,pull_request_key,created_date,merged_date,closed_date,type,component,merge_commit_sha,head_ref,base_ref,base_commit_sha,head_commit_sha
+gitlab:GithubPullRequest:1:203756736,gitlab:GithubRepo:1:134018330,,closed,pre-allocate
the capacity of the worker list,"""fix #3 \r\n* 链表实际测过, 性能相差无几, 但内存占用高了几倍\r\n*
初始化`Pool`和`PoolFunc`是给定了个默认的worker capacity\r\n*
优化了下其他代码""",https://github.com/panjf2000/ants/pull/4,barryz,gitlab:GithubUser:16658738,,4,2018-07-25T08:19:30.000+00:00,2018-07-26T02:32:41.000+00:00,2018-07-26T02:32:41.000+00:00,,,3ddd58c390b0f928a5782c235f90ad0c9c21312c,pre_allocate,master,f5b37d0798a8e4c6780a1e08270fa50e9
[...]
+gitlab:GithubPullRequest:1:211603583,gitlab:GithubRepo:1:134018330,,closed,fix
goroutine leak,"""n++, will cause workers[0]
leak""",https://github.com/panjf2000/ants/pull/8,hongli-my,gitlab:GithubUser:8597823,,8,2018-08-29T01:35:54.000+00:00,,2018-10-30T00:12:13.000+00:00,,,74ba726f34abe487b7defac6bb9bebf24d342377,dev,master,666635c65d8d3bb1223b819325e0bd23c81f2733,afd687164b13280199208ec4869709edcf02b52d
+gitlab:GithubPullRequest:1:212277907,gitlab:GithubRepo:1:134018330,,closed,Update
pool.go,"""#活着的孩子不想当孤儿\r\n\tHopefully:\r\n\tchildren :=
[]*child{C1,C2,C3,C4,C5,C6,C7}\r\n\tIn fact:\r\n\tchildren :=
[]*child{C1,C4,C2,C3,C5,C6,C7}""",https://github.com/panjf2000/ants/pull/9,Nonnnnnnnnn,gitlab:GithubUser:42808204,,9,2018-08-31T05:29:36.000+00:00,,2018-08-31T13:40:33.000+00:00,,,f14d3f91f68d0bc23fe42aa413e98005f6575045,patch-1,master,666635c65d8d3bb1223b819325e0bd23c81f2733,2726d42ea628572
[...]
+gitlab:GithubPullRequest:1:216254598,gitlab:GithubRepo:1:134018330,,closed,graceful
exit,"""graceful
exit""",https://github.com/panjf2000/ants/pull/11,shanhuhai5739,gitlab:GithubUser:3794113,,11,2018-09-18T10:15:01.000+00:00,,2018-12-03T03:52:35.000+00:00,,,6a87067eb3d6440e5db17f31d4bc12ac291633f4,master,develop,833b6e29acfb2f16e3cf7fc92c79763847c319f4,a03eccc794870f0a2e55a5cb8344ea47f2a0001d
+gitlab:GithubPullRequest:1:218939809,gitlab:GithubRepo:1:134018330,,closed,解决死循环导致cpu占用率过高,"""使用了cond
条件变量来阻塞Submit
goroutine。潘少,你再仔细琢磨琢磨,看下有何不妥?""",https://github.com/panjf2000/ants/pull/13,liyonglion,gitlab:GithubUser:12890888,,13,2018-09-28T11:37:28.000+00:00,2018-09-29T11:29:54.000+00:00,2018-09-29T11:29:54.000+00:00,,,9a3b5cd25344822bca7684f87d9e123890a7bf59,master,master,af376f1b7b59dc488458bcecd4273f0fcde33c55,1846b4392a3a20e6bf1a7431b67f86bd43e0f0b9
+gitlab:GithubPullRequest:1:219363161,gitlab:GithubRepo:1:134018330,,closed,Remove
meaningless if
statements,"""""",https://github.com/panjf2000/ants/pull/14,SimePel,gitlab:GithubUser:20608155,,14,2018-10-01T12:48:11.000+00:00,2018-10-02T13:52:27.000+00:00,2018-10-02T13:52:27.000+00:00,,,29730bb70343924a2f56a13a9799611dd1cd27fd,master,master,1b62696050b7030106291980d5220f886b017eff,5ed168767a771e3802252020b9821610380ed1a4
+gitlab:GithubPullRequest:1:219936521,gitlab:GithubRepo:1:134018330,,closed,Fixes
to benchmarks and added semaphore comparison,"""Benchmark results with
Param=0, as time.Sleep is not stable on Windows\r\n\r\nAlso Go 1.11 has bunch
of improvements:\r\n\r\n```\r\ngoos: windows\r\ngoarch: amd64\r\npkg:
github.com/panjf2000/ants\r\nBenchmarkGoroutineWithFunc-8 1
3530220300 ns/op 207472 B/op 506
allocs/op\r\nBenchmarkSemaphoreWithFunc-8 1 43919 [...]
+gitlab:GithubPullRequest:1:222703171,gitlab:GithubRepo:1:134018330,,closed,bugfix(check
max pool size),"""if you limit max goroutine to math.Maxint32 as your code
`int32(pool size)`\r\nI think should check max Goroutine size, otherwise size
overflow to
negative?\r\n""",https://github.com/panjf2000/ants/pull/16,rikewang,gitlab:GithubUser:24841832,,16,2018-10-14T09:21:41.000+00:00,,2018-12-03T03:53:31.000+00:00,,,1399cfa28f6751f769a985206daecb56a08b2de9,bugfix_check_max_pool_size,master,7
[...]
+gitlab:GithubPullRequest:1:231840723,gitlab:GithubRepo:1:134018330,,closed,Possible
memory leak because of Ticker,"""// NewTicker returns a new Ticker containing
a channel that will send the\r\n// time with a period specified by the duration
argument.\r\n// It adjusts the intervals or drops ticks to make up for slow
receivers.\r\n// The duration d must be greater than zero; if not, NewTicker
will panic.\r\n// Stop the ticker to release associated resources.\r\nfunc
NewTicker(d Duration) [...]
+gitlab:GithubPullRequest:1:246250598,gitlab:GithubRepo:1:134018330,,closed,feature:
add PanicHandler,"""@panjf2000 PTAL\r\nFix #22 \r\nSigned-off-by: Cholerae Hu
<[email protected]>""",https://github.com/panjf2000/ants/pull/23,choleraehyq,gitlab:GithubUser:8923413,,23,2019-01-21T10:58:15.000+00:00,2019-01-22T05:41:34.000+00:00,2019-01-22T05:41:34.000+00:00,,,9158bd37025ccdd29d6346a6639a282e0060c7e2,panichandler,master,812dd4e01075be3cf97429a43abaf6837908cdcd,5bbc9e170bbee27c37bcc30da
[...]
+gitlab:GithubPullRequest:1:267414275,gitlab:GithubRepo:1:134018330,,closed,goreport:
lint warning on code comment structure,"""Added a newline between group
comment and exported variable line
😄""",https://github.com/panjf2000/ants/pull/30,sarathsp06,gitlab:GithubUser:964542,,30,2019-04-04T11:52:48.000+00:00,2019-04-23T11:11:58.000+00:00,2019-04-23T11:11:58.000+00:00,,,dec04010834ccd3691eb1776045ce3b9310ce26c,patch-1,master,4ae3fb8dc413492862469027bb58cb45b77338f1,ec5d1f3b8107265cb5353697
[...]
+gitlab:GithubPullRequest:1:292246524,gitlab:GithubRepo:1:134018330,,closed,handle
job
panic,"""""",https://github.com/panjf2000/ants/pull/36,king526,gitlab:GithubUser:38849208,,36,2019-06-27T03:27:05.000+00:00,,2019-08-17T20:32:34.000+00:00,,,95e11bf85f18a80197918d15a19ec10f41903d63,master,master,05e96abd6103ae7b70436abe58dbc0ad7e740929,39f04c6e65b76b5f20abd3ca0606db4cd038e5c2
+gitlab:GithubPullRequest:1:300598936,gitlab:GithubRepo:1:134018330,,closed,优化清理速度并修复内存泄漏,"""""",https://github.com/panjf2000/ants/pull/39,wwjiang,gitlab:GithubUser:1290360,,39,2019-07-24T07:41:02.000+00:00,2019-07-26T04:00:12.000+00:00,2019-07-26T04:00:12.000+00:00,,,21a109c7f0873c8f466d6710de23474968940011,master,master,fc48d32604efc2b36d144b8f83d34c1aa1fda1c9,b44a12884b495713a44f796981267ed87134decb
+gitlab:GithubPullRequest:1:301421607,gitlab:GithubRepo:1:134018330,,closed,"optimize
memory allocation, change the default pool param and add the log of panic
stack.","""Hi, I am using it on my online server which almost need 5 million
goroutines on each go service.\r\nI'm divided into 10 small pools, because a
pool of five million will slow down the speed associated with the slice.\r\nI
made some small optimizations, I hope this is useful.\r\noptimize memory
allocation, change the defau [...]
+gitlab:GithubPullRequest:1:308859272,gitlab:GithubRepo:1:134018330,,closed,support
nonblocking submit and max blocking limit setting,"""Signed-off-by: Cholerae
Hu
<[email protected]>""",https://github.com/panjf2000/ants/pull/41,choleraehyq,gitlab:GithubUser:8923413,,41,2019-08-20T03:24:27.000+00:00,2019-08-20T10:55:19.000+00:00,2019-08-20T10:55:19.000+00:00,,,faef79b7d8a4876da8a215d7794cce20c710aaa2,nonblocking,master,dc8169d5c2645bfc507d6993b7d215326300f31b,58466b12b03a603d9f0331bbc
[...]
+gitlab:GithubPullRequest:1:311420898,gitlab:GithubRepo:1:134018330,,closed,Create
CODE_OF_CONDUCT.md,"""""",https://github.com/panjf2000/ants/pull/48,panjf2000,gitlab:GithubUser:7496278,,48,2019-08-27T14:44:03.000+00:00,2019-08-27T14:46:22.000+00:00,2019-08-27T14:46:22.000+00:00,,,d5eded45bffe827e5a64a3376c4b94f08b641031,add-code-of-conduct-1,master,44aec9954f58987c37d5937ba590bbf0812a32de,bba6c12b60eff3445adcc168fff3bfdcad9e2571
+gitlab:GithubPullRequest:1:316337433,gitlab:GithubRepo:1:134018330,,closed,Invoke
decRunning() when revertWorker() returns false,"""Signed-off-by: Cholerae Hu
<[email protected]>\r\n\r\n---\r\nname: Pull request\r\nabout: Propose
changes to the code\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help [...]
+gitlab:GithubPullRequest:1:325179595,gitlab:GithubRepo:1:134018330,,closed,add
loop queue ,"""---\r\nname: Pull request\r\nabout:
抽象出worker队列的实现,使用原先和循环队列实现这个接口\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help save time in case the change is not
a good fit for the project. Not all pull requests get mer [...]
+gitlab:GithubPullRequest:1:329127652,gitlab:GithubRepo:1:134018330,,closed,throw
out default panic,"""<the Go programming language>\r\n5.10.
Recover\r\nRecovering indiscriminately from panics is a dubious practice
because the state of a package’s variables after a panic is rarely well defined
or documented. Perhaps a critical update to a data structure was incomplete, a
file or net work connection was opened but not closed, or a lock was acquired
but not released. Furthermore, by replaci [...]
+gitlab:GithubPullRequest:1:346931859,gitlab:GithubRepo:1:134018330,,closed,Refine
the indentation of the sample code in
READMEs,"""""",https://github.com/panjf2000/ants/pull/66,RealLiuSha,gitlab:GithubUser:5715152,,66,2019-11-29T07:50:17.000+00:00,,2019-11-29T07:52:04.000+00:00,,,1acafed7740d0daf1dcc3a30129798f59c234331,master,master,fd3841dd88c15fcc0e0ea94e606d980221ac5e09,b19edbd7b909527b2cc2a759e7a60133497f9dee
+gitlab:GithubPullRequest:1:379435034,gitlab:GithubRepo:1:134018330,,closed,Fix
a bug that doesn't release lock,"""err!=nil时未释放锁,使用defer
p.lock.Unlock()修复\r\n\r\n---\r\nname: Pull request\r\nabout: Propose changes to
the code\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help save time in case the change [...]
+gitlab:GithubPullRequest:1:404931293,gitlab:GithubRepo:1:134018330,,closed,fix:v2
dir not exist,"""---\r\nname: Pull request\r\nabout: Propose changes to the
code\r\ntitle: ''\r\nlabels: ''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank
you for contributing to `ants`! Please fill this out to help us make the most
of your pull request.\r\n\r\nWas this change discussed in an issue first? That
can help save time in case the change is not a good fit for the project. Not
all pull requests get m [...]
+gitlab:GithubPullRequest:1:410487606,gitlab:GithubRepo:1:134018330,,closed,Fix
indent on README,"""---\r\nname: Pull request\r\nabout: Propose changes to the
code\r\ntitle: 'Fix indent'\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help save time in case the change is not
a good fit for the project. Not all pull requ [...]
+gitlab:GithubPullRequest:1:415925259,gitlab:GithubRepo:1:134018330,,closed,支持配置workerChanCap大小,"""---\r\nname:
Pull request\r\nabout: support customize workerChanCap \r\ntitle:
''\r\nlabels: ''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for
contributing to `ants`! Please fill this out to help us make the most of your
pull request.\r\n\r\nWas this change discussed in an issue first? That can help
save time in case the change is not a good fit for the project. Not all pull
requests g [...]
+gitlab:GithubPullRequest:1:452382525,gitlab:GithubRepo:1:134018330,,closed,chore:
support go1.14,"""as
title.""",https://github.com/panjf2000/ants/pull/100,appleboy,gitlab:GithubUser:21979,,100,2020-07-19T06:38:38.000+00:00,2020-07-19T14:59:48.000+00:00,2020-07-19T14:59:48.000+00:00,,,0a7be73d35726850863a80432dec0ac5c78cdfb4,patch,master,b2666199751ef4fe666c175ba667d18a182b67e0,18623ceb17a9230484ff5d1a31c3beb0b631a2f3
+gitlab:GithubPullRequest:1:461992435,gitlab:GithubRepo:1:134018330,,closed,Add
a Gitter chat badge to README.md,"""### panjf2000/ants now has a Chat Room on
Gitter\n\n@panjf2000 has just created a chat room. You can visit it here:
[https://gitter.im/ants-pool/ants](https://gitter.im/ants-pool/ants?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&content=body_link).\n\nThis
pull-request adds this badge to your
README.md:\n\n\n[] [...]
+gitlab:GithubPullRequest:1:475457581,gitlab:GithubRepo:1:134018330,,closed,Avoid
memory leak,"""---\r\nname: Pull request\r\nabout: Propose changes to the
code\r\ntitle: 'avoid memory leaky'\r\nlabels: 'gc'\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help save time in case the change is not
a good fit for the project. Not all pu [...]
+gitlab:GithubPullRequest:1:496172205,gitlab:GithubRepo:1:134018330,,closed,Remove
underscore from file names,"""\r\n## 1. Are you opening this pull request for
bug-fixes, optimizations, or new features?\r\nFixing the file naming convention
based on
[this](https://golang.org/doc/effective_go.html#package-names).\r\n\r\n## 2.
Please describe how these code changes achieve your intention.\r\nThere is no
code change\r\n\r\n\r\n\r\n_(Feel free to reject this PR if you think it's
unnecessary)_ [...]
+gitlab:GithubPullRequest:1:502102437,gitlab:GithubRepo:1:134018330,,closed,fix:
Memory leak,"""Fixes
#113""",https://github.com/panjf2000/ants/pull/114,Mutated1994,gitlab:GithubUser:29589055,,114,2020-10-13T08:37:37.000+00:00,2020-10-15T03:35:56.000+00:00,2020-10-15T03:35:56.000+00:00,,,94a7a7f1cb3a11fcaaf9608c94fe1dc0bcd98ab0,master,master,ef6017217221e20416d886c0231dd5134752ef4e,00691c648a5b7d28dba5bcafa05d9bbccdf4d933
+gitlab:GithubPullRequest:1:505486248,gitlab:GithubRepo:1:134018330,,closed,fix
set negative size,"""fix set negative size for
pool\r\n""",https://github.com/panjf2000/ants/pull/117,imxyb,gitlab:GithubUser:7411249,,117,2020-10-18T14:58:12.000+00:00,,2020-10-19T01:58:45.000+00:00,,,55d7f5eb6298d59b76a26b56d1bbb776503a8563,hotfix-poolsize,master,94a7a7f1cb3a11fcaaf9608c94fe1dc0bcd98ab0,05a3664dbf966f1a7ced274aaf47d34e644287ef
+gitlab:GithubPullRequest:1:543900177,gitlab:GithubRepo:1:134018330,,closed,Add
go1.15.x support on CI,"""Add go1.15.x support on
CI""",https://github.com/panjf2000/ants/pull/131,kaiiak,gitlab:GithubUser:2832687,,131,2020-12-22T06:25:18.000+00:00,,2021-03-19T02:15:23.000+00:00,,,545d5f0c007d1d5e2cd23ae2d9074365c0f03790,patch-1,master,fd8d670fd09489e6ea7693c0a382ba85d2694f16,15cb2705734c62544ac5dca0de3f28f03a69a854
+gitlab:GithubPullRequest:1:582870188,gitlab:GithubRepo:1:134018330,,closed,Change
the writing of if...err,"""---\r\nname: Pull request\r\nabout: Propose changes
to the code\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help save time in case the change is not
a good fit for the project. Not all pull requ [...]
+gitlab:GithubPullRequest:1:586207150,gitlab:GithubRepo:1:134018330,,closed,The
program should return directly when the pool size passed in when …,"""…calling
the NewPool interface is less than or equal to 0\r\n\r\n---\r\nname: Pull
request\r\nabout: Propose changes to the code\r\ntitle: 'code
improve'\r\n---\r\n""",https://github.com/panjf2000/ants/pull/139,zhangyuanxue,gitlab:GithubUser:32893410,,139,2021-03-07T08:00:46.000+00:00,,2021-03-12T12:45:57.000+00:00,,,9a4288b9368ab4551d967fdd
[...]
+gitlab:GithubPullRequest:1:607755003,gitlab:GithubRepo:1:134018330,,closed,pool_list,"""sequence""",https://github.com/panjf2000/ants/pull/149,yddeng,gitlab:GithubUser:41562937,,149,2021-04-02T01:16:21.000+00:00,,2021-04-02T04:09:52.000+00:00,,,fd1b0378ee9b60fe32a2fe5c8198a427e5f46949,pool_list,master,dbcb6a104f23b1a6a7521796b30515230353283e,674fe08bb2c2ced275600ebdddf2412c84e2c349
+gitlab:GithubPullRequest:1:654684379,gitlab:GithubRepo:1:134018330,,open,Submit
a task with args to pool,"""---\r\nname: Resolve problem with args
capturing\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please
fill this out to help us make the most of your pull request.\r\n\r\nWas this
change discussed in an issue first? That can help save time in case the change
is not a good fit for the project. Not all pull requests get merged.\r\n\r\nIt
is not uncommon for pull requests [...]
+gitlab:GithubPullRequest:1:669972849,gitlab:GithubRepo:1:134018330,,open,allow
NewPoolWithFunc can invoke with nil argument,"""2. abstract a Task interface
for SubmitTask which is more convenient\r\n\r\n---\r\nname: Pull
request\r\nabout: Propose changes to the code\r\ntitle: 'allow NewPoolWithFunc
can invoke with nil argument'\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n [...]
+gitlab:GithubPullRequest:1:686947632,gitlab:GithubRepo:1:134018330,,closed,Timing
issue in the TestNonblockingSubmitWithFunc,"""On some machines this unit would
fail due to a timing issue. Since the Invoke in the loop was using nil as the
param, it would (depending on timing) lead to the workers finishing the (w
*goWorkerWithFunc) run() in the range loop over w.args as args would == nil and
return. \r\n\r\nIf an explicit time.Sleep(1 * time.Second) is added before the
\""\tassert.Equal [...]
+gitlab:GithubPullRequest:1:693963625,gitlab:GithubRepo:1:134018330,,closed,Fix
CI workflow to make the cache action really work,"""workflows add cache mod
file\r\nworkflows should be restore cache before unit test\r\nlink
[actions/cache](https://github.com/marketplace/actions/cache)\r\n---\r\nname:
Pull request\r\nabout: Propose changes to the code\r\ntitle:
'workflows'\r\nlabels: 'workflows'\r\nassignees: ''\r\n---\r\n\r\n## 1. Are you
opening this pull request for bug-fixs, optimizatio [...]
+gitlab:GithubPullRequest:1:696437287,gitlab:GithubRepo:1:134018330,,open,feat:
goroutine exits immediately,"""---\r\nname: goroutine exits
immediately\r\nabout: goroutine exits immediately, lazy init
defaultAntsPool\r\ntitle: 'goroutine exits immediately'\r\nlabels:
''\r\nassignees: 'panjf2000'\r\n---\r\n\r\n<!--\r\nThank you for contributing
to `ants`! Please fill this out to help us make the most of your pull
request.\r\n\r\nWas this change discussed in an issue first? That can help sa
[...]
+gitlab:GithubPullRequest:1:731946063,gitlab:GithubRepo:1:134018330,,closed,style:
fixed some typos in the comments,"""---\r\nname: Pull request\r\nabout: typos
in comments\r\ntitle: fixed some typos in the comments\r\nlabels:
\r\nassignees: @panjf2000 \r\n---\r\n\r\n<!--\r\nThank you for contributing to
`ants`! Please fill this out to help us make the most of your pull
request.\r\n\r\nWas this change discussed in an issue first? That can help save
time in case the change is not a good fi [...]
+gitlab:GithubPullRequest:1:736936308,gitlab:GithubRepo:1:134018330,,closed,Update
the link of one of the relevant articles,"""Hello! I never got the chance to
mention it before, but thank you for linking one of my articles in your
repository :) \r\n\r\n## 1. Are you opening this pull request for bug-fixs,
optimizations or new feature?\r\nNo\r\n\r\n\r\n## 2. Please describe how these
code changes achieve your intention.\r\nI'm working on migrating my domain from
`twinnation.org` to `twin. [...]
+gitlab:GithubPullRequest:1:742901118,gitlab:GithubRepo:1:134018330,,closed,Update
the link of one of the relevant articles,"""re: #185\r\n\r\nMissed the
`README_ZH.md` file 😅
""",https://github.com/panjf2000/ants/pull/186,TwiN,gitlab:GithubUser:15699766,,186,2021-09-26T15:53:39.000+00:00,2021-09-27T02:38:55.000+00:00,2021-09-27T02:38:55.000+00:00,,,3f9c4cd54898e7149c7f6d072213b8fdbd0036d8,patch-1,master,61d120b6f086998184f402a83ace485a036d4c7d,41f6b572b25da6363d7d7c45b77705fd8bee7466
+gitlab:GithubPullRequest:1:757412327,gitlab:GithubRepo:1:134018330,,closed,add
shopify into user cases,"""Fixes
https://github.com/panjf2000/ants/issues/188""",https://github.com/panjf2000/ants/pull/189,lilien1010,gitlab:GithubUser:3814966,,189,2021-10-13T13:34:05.000+00:00,2021-10-13T13:42:42.000+00:00,2021-10-13T13:42:42.000+00:00,,,76ce0ce24f21b1dd13050e0c84b07ce55e68f111,add-shopify-as-user-case,master,3f9c4cd54898e7149c7f6d072213b8fdbd0036d8,efe0bad6c0ab13b54d00909864e34a1060e41d6e
+gitlab:GithubPullRequest:1:763816683,gitlab:GithubRepo:1:134018330,,closed,add
more test about spinlock,"""---\r\nname: Pull request\r\nabout: add more test
about spinlock\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help save time in case the change is not
a good fit for the project. Not all pull req [...]
+gitlab:GithubPullRequest:1:770998086,gitlab:GithubRepo:1:134018330,,closed,Replace
goto with simple for loop,"""---\r\nname: Pull request\r\nabout: Replace goto
with simple for loop\r\ntitle: 'Replace goto with simple for loop'\r\nlabels:
''\r\nassignees: ''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`!
Please fill this out to help us make the most of your pull request.\r\n\r\nWas
this change discussed in an issue first? That can help save time in case the
change is not a g [...]
+gitlab:GithubPullRequest:1:791490205,gitlab:GithubRepo:1:134018330,,closed,optimize:
calculating mid in binary search,"""---\r\nname: Pull request\r\nabout:
Propose changes to the code\r\ntitle: ''\r\nlabels: ''\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull request.\r\n\r\nWas this change
discussed in an issue first? That can help save time in case the change is not
a good fit for the project. Not a [...]
+gitlab:GithubPullRequest:1:816835878,gitlab:GithubRepo:1:134018330,,closed,Add
binarysearch of loop queue,"""---\r\nname: Pull request\r\nabout: Add
binarysearch method to loop_queue to get expired workers, just like
worker_stack.\r\ntitle: ''\r\nlabels: ''\r\nassignees:
'bright2227'\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please
fill this out to help us make the most of your pull request.\r\n\r\nWas this
change discussed in an issue first? That can help save time in [...]
+gitlab:GithubPullRequest:1:835038436,gitlab:GithubRepo:1:134018330,,closed,Awake
the blocking callers when Tune(size int) is invoked to expand the
pool,"""…capacity\r\n\r\n---\r\nname: Pull request\r\nabout: Propose changes to
the code\r\ntitle: 'Instantly scale up capacity when using Tune(size int) to
enlarge the capacity'\r\nlabels: 'enhancement'\r\nassignees:
''\r\n---\r\n\r\n<!--\r\nThank you for contributing to `ants`! Please fill this
out to help us make the most of your pull reque [...]
+gitlab:GithubPullRequest:1:842184289,gitlab:GithubRepo:1:134018330,,open,Remove
worker_func.go and modify pool_func.go simplifying the library,"""---\r\nname:
Remove worker_func.go and modify pool_func.go simplifying the library\r\nabout:
Remove worker_func.go and modify pool_func.go to simply utilize the non-func
pool+worker implementation\r\ntitle: 'Remove worker_func.go and modify
pool_func.go simplifying the library'\r\nlabels: ''\r\nassignees: @panjf2000
\r\n---\r\n\r\n<!--\r\nThank [...]
diff --git a/plugins/github/models/migrationscripts/archived/pull_request.go
b/plugins/github/models/migrationscripts/archived/pull_request.go
index ef4ff04b..c3db4c48 100644
--- a/plugins/github/models/migrationscripts/archived/pull_request.go
+++ b/plugins/github/models/migrationscripts/archived/pull_request.go
@@ -24,6 +24,7 @@ import (
)
type GithubPullRequest struct {
+ ConnectionId uint64 `gorm:"primaryKey"`
GithubId int `gorm:"primaryKey"`
RepoId int `gorm:"index"`
Number int `gorm:"index"` // This number is used in GET
requests to the API associated to reviewers / comments / etc.
diff --git
a/plugins/github/models/migrationscripts/archived/pull_request_label.go
b/plugins/github/models/migrationscripts/archived/pull_request_label.go
index 73795001..b96fb424 100644
--- a/plugins/github/models/migrationscripts/archived/pull_request_label.go
+++ b/plugins/github/models/migrationscripts/archived/pull_request_label.go
@@ -23,8 +23,9 @@ import
"github.com/apache/incubator-devlake/models/migrationscripts/archived"
// Pull Requests are considered Issues in GitHub.
type GithubPullRequestLabel struct {
- PullId int `gorm:"primaryKey;autoIncrement:false"`
- LabelName string `gorm:"primaryKey;type:varchar(255)"`
+ ConnectionId uint64 `gorm:"primaryKey"`
+ PullId int `gorm:"primaryKey;autoIncrement:false"`
+ LabelName string `gorm:"primaryKey;type:varchar(255)"`
archived.NoPKModel
}
diff --git a/plugins/github/models/migrationscripts/init_schema_20220611.go
b/plugins/github/models/migrationscripts/init_schema_20220611.go
index 23acfce8..9453c359 100644
--- a/plugins/github/models/migrationscripts/init_schema_20220611.go
+++ b/plugins/github/models/migrationscripts/init_schema_20220611.go
@@ -131,7 +131,7 @@ func (u *InitSchemas) Up(ctx context.Context, db *gorm.DB)
error {
}
func (*InitSchemas) Version() uint64 {
- return 20220611000001
+ return 20220612000001
}
func (*InitSchemas) Name() string {
diff --git a/plugins/github/models/pr.go b/plugins/github/models/pr.go
index a9e870a9..d5395fc5 100644
--- a/plugins/github/models/pr.go
+++ b/plugins/github/models/pr.go
@@ -23,6 +23,7 @@ import (
)
type GithubPullRequest struct {
+ ConnectionId uint64 `gorm:"primaryKey"`
GithubId int `gorm:"primaryKey"`
RepoId int `gorm:"index"`
Number int `gorm:"index"` // This number is used in GET
requests to the API associated to reviewers / comments / etc.
diff --git a/plugins/github/models/pr_label.go
b/plugins/github/models/pr_label.go
index 0eb26138..caf58e18 100644
--- a/plugins/github/models/pr_label.go
+++ b/plugins/github/models/pr_label.go
@@ -25,8 +25,9 @@ import (
// Pull Requests are considered Issues in GitHub.
type GithubPullRequestLabel struct {
- PullId int `gorm:"primaryKey;autoIncrement:false"`
- LabelName string `gorm:"primaryKey;type:varchar(255)"`
+ ConnectionId uint64 `gorm:"primaryKey"`
+ PullId int `gorm:"primaryKey;autoIncrement:false"`
+ LabelName string `gorm:"primaryKey;type:varchar(255)"`
common.NoPKModel
}
diff --git a/plugins/github/tasks/pr_collector.go
b/plugins/github/tasks/pr_collector.go
index 83a5a3cb..afdc1db5 100644
--- a/plugins/github/tasks/pr_collector.go
+++ b/plugins/github/tasks/pr_collector.go
@@ -20,6 +20,7 @@ package tasks
import (
"encoding/json"
"fmt"
+ "github.com/apache/incubator-devlake/plugins/core/dal"
"net/http"
"net/url"
@@ -41,7 +42,7 @@ var CollectApiPullRequestsMeta = core.SubTaskMeta{
}
func CollectApiPullRequests(taskCtx core.SubTaskContext) error {
- db := taskCtx.GetDb()
+ db := taskCtx.GetDal()
data := taskCtx.GetData().(*GithubTaskData)
since := data.Since
@@ -50,9 +51,12 @@ func CollectApiPullRequests(taskCtx core.SubTaskContext)
error {
// actually, for github pull, since doesn't make any sense, github pull
api doesn't support it
if since == nil {
var latestUpdated models.GithubPullRequest
- err := db.Model(&latestUpdated).
- Where("repo_id = ?", data.Repo.GithubId).
- Order("github_updated_at
DESC").Limit(1).Find(&latestUpdated).Error
+ err := db.All(
+ &latestUpdated,
+ dal.Where("repo_id = ? and connection_id=?",
data.Repo.GithubId, data.Options.ConnectionId),
+ dal.Orderby("github_updated_at DESC"),
+ dal.Limit(1),
+ )
if err != nil {
return fmt.Errorf("failed to get latest github issue
record: %w", err)
}
@@ -66,8 +70,9 @@ func CollectApiPullRequests(taskCtx core.SubTaskContext)
error {
RawDataSubTaskArgs: helper.RawDataSubTaskArgs{
Ctx: taskCtx,
Params: GithubApiParams{
- Owner: data.Options.Owner,
- Repo: data.Options.Repo,
+ ConnectionId: data.Options.ConnectionId,
+ Owner: data.Options.Owner,
+ Repo: data.Options.Repo,
},
/*
Table store raw data
diff --git a/plugins/github/tasks/pr_convertor.go
b/plugins/github/tasks/pr_convertor.go
index 95732ab2..f7ddd058 100644
--- a/plugins/github/tasks/pr_convertor.go
+++ b/plugins/github/tasks/pr_convertor.go
@@ -18,6 +18,7 @@ limitations under the License.
package tasks
import (
+ "github.com/apache/incubator-devlake/plugins/core/dal"
"reflect"
"github.com/apache/incubator-devlake/models/domainlayer"
@@ -36,11 +37,14 @@ var ConvertPullRequestsMeta = core.SubTaskMeta{
}
func ConvertPullRequests(taskCtx core.SubTaskContext) error {
- db := taskCtx.GetDb()
+ db := taskCtx.GetDal()
data := taskCtx.GetData().(*GithubTaskData)
repoId := data.Repo.GithubId
- cursor, err := db.Model(&models.GithubPullRequest{}).Where("repo_id =
?", repoId).Rows()
+ cursor, err := db.Cursor(
+ dal.From(&models.GithubPullRequest{}),
+ dal.Where("repo_id = ? and connection_id = ?", repoId,
data.Options.ConnectionId),
+ )
if err != nil {
return err
}
@@ -56,8 +60,9 @@ func ConvertPullRequests(taskCtx core.SubTaskContext) error {
RawDataSubTaskArgs: helper.RawDataSubTaskArgs{
Ctx: taskCtx,
Params: GithubApiParams{
- Owner: data.Options.Owner,
- Repo: data.Options.Repo,
+ ConnectionId: data.Options.ConnectionId,
+ Owner: data.Options.Owner,
+ Repo: data.Options.Repo,
},
Table: RAW_PULL_REQUEST_TABLE,
},
@@ -65,9 +70,9 @@ func ConvertPullRequests(taskCtx core.SubTaskContext) error {
pr := inputRow.(*models.GithubPullRequest)
domainPr := &code.PullRequest{
DomainEntity: domainlayer.DomainEntity{
- Id: prIdGen.Generate(pr.GithubId),
+ Id:
prIdGen.Generate(data.Options.ConnectionId, pr.GithubId),
},
- BaseRepoId: repoIdGen.Generate(pr.RepoId),
+ BaseRepoId:
repoIdGen.Generate(data.Options.ConnectionId, pr.RepoId),
Status: pr.State,
Title: pr.Title,
Url: pr.Url,
diff --git a/plugins/github/tasks/pr_extractor.go
b/plugins/github/tasks/pr_extractor.go
index 69ba2b65..771c41d8 100644
--- a/plugins/github/tasks/pr_extractor.go
+++ b/plugins/github/tasks/pr_extractor.go
@@ -88,8 +88,9 @@ func ExtractApiPullRequests(taskCtx core.SubTaskContext)
error {
set of data to be process, for example, we
process JiraIssues by Board
*/
Params: GithubApiParams{
- Owner: data.Options.Owner,
- Repo: data.Options.Repo,
+ ConnectionId: data.Options.ConnectionId,
+ Owner: data.Options.Owner,
+ Repo: data.Options.Repo,
},
/*
Table store raw data
@@ -108,14 +109,15 @@ func ExtractApiPullRequests(taskCtx core.SubTaskContext)
error {
return nil, nil
}
//If this is a pr, ignore
- githubPr, err := convertGithubPullRequest(rawL,
data.Repo.GithubId)
+ githubPr, err := convertGithubPullRequest(rawL,
data.Options.ConnectionId, data.Repo.GithubId)
if err != nil {
return nil, err
}
for _, label := range rawL.Labels {
results = append(results,
&models.GithubPullRequestLabel{
- PullId: githubPr.GithubId,
- LabelName: label.Name,
+ ConnectionId: data.Options.ConnectionId,
+ PullId: githubPr.GithubId,
+ LabelName: label.Name,
})
// if pr.Type has not been set and prType is
set in .env, process the below
if labelTypeRegex != nil {
@@ -145,8 +147,9 @@ func ExtractApiPullRequests(taskCtx core.SubTaskContext)
error {
return extractor.Execute()
}
-func convertGithubPullRequest(pull *GithubApiPullRequest, repoId int)
(*models.GithubPullRequest, error) {
+func convertGithubPullRequest(pull *GithubApiPullRequest, connId uint64,
repoId int) (*models.GithubPullRequest, error) {
githubPull := &models.GithubPullRequest{
+ ConnectionId: connId,
GithubId: pull.GithubId,
RepoId: repoId,
Number: pull.Number,
diff --git a/plugins/github/tasks/pr_label_convertor.go
b/plugins/github/tasks/pr_label_convertor.go
index ad0f2bc7..ad64c925 100644
--- a/plugins/github/tasks/pr_label_convertor.go
+++ b/plugins/github/tasks/pr_label_convertor.go
@@ -18,6 +18,7 @@ limitations under the License.
package tasks
import (
+ "github.com/apache/incubator-devlake/plugins/core/dal"
"reflect"
"github.com/apache/incubator-devlake/models/domainlayer/code"
@@ -35,15 +36,16 @@ var ConvertPullRequestLabelsMeta = core.SubTaskMeta{
}
func ConvertPullRequestLabels(taskCtx core.SubTaskContext) error {
- db := taskCtx.GetDb()
+ db := taskCtx.GetDal()
data := taskCtx.GetData().(*GithubTaskData)
repoId := data.Repo.GithubId
- cursor, err := db.Model(&githubModels.GithubPullRequestLabel{}).
- Joins(`left join _tool_github_pull_requests on
_tool_github_pull_requests.github_id =
_tool_github_pull_request_labels.pull_id`).
- Where("_tool_github_pull_requests.repo_id = ?", repoId).
- Order("pull_id ASC").
- Rows()
+ cursor, err := db.Cursor(
+ dal.From(&githubModels.GithubPullRequestLabel{}),
+ dal.Join(`left join _tool_github_pull_requests on
_tool_github_pull_requests.github_id =
_tool_github_pull_request_labels.pull_id`),
+ dal.Where("_tool_github_pull_requests.repo_id = ? and
_tool_github_pull_requests.connection_id = ?", repoId,
data.Options.ConnectionId),
+ dal.Orderby("pull_id ASC"),
+ )
if err != nil {
return err
}
@@ -56,15 +58,16 @@ func ConvertPullRequestLabels(taskCtx core.SubTaskContext)
error {
RawDataSubTaskArgs: helper.RawDataSubTaskArgs{
Ctx: taskCtx,
Params: GithubApiParams{
- Owner: data.Options.Owner,
- Repo: data.Options.Repo,
+ ConnectionId: data.Options.ConnectionId,
+ Owner: data.Options.Owner,
+ Repo: data.Options.Repo,
},
Table: RAW_PULL_REQUEST_TABLE,
},
Convert: func(inputRow interface{}) ([]interface{}, error) {
prLabel :=
inputRow.(*githubModels.GithubPullRequestLabel)
domainPrLabel := &code.PullRequestLabel{
- PullRequestId: prIdGen.Generate(prLabel.PullId),
+ PullRequestId:
prIdGen.Generate(data.Options.ConnectionId, prLabel.PullId),
LabelName: prLabel.LabelName,
}
return []interface{}{