Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change uniques for prs and issues #1991

Merged
merged 1 commit into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion augur/tasks/github/issues/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def process_issues(issues, task_name, repo_id, logger) -> None:
# issue_urls are gloablly unique across github so we are using it to determine whether an issue we collected is already in the table
# specified in issue_return_columns is the columns of data we want returned. This data will return in this form; {"issue_url": url, "issue_id": id}
logger.info(f"{task_name}: Inserting {len(issue_dicts)} issues")
issue_natural_keys = ["issue_url"]
issue_natural_keys = ["repo_id", "gh_issue_id"]
issue_return_columns = ["issue_url", "issue_id"]
issue_string_columns = ["issue_title", "issue_body"]
issue_return_data = session.insert_data(issue_dicts, Issue, issue_natural_keys, return_columns=issue_return_columns, string_fields=issue_string_columns)
Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/github/pull_requests/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def process_pull_requests(pull_requests, task_name, repo_id, logger):
# pr_urls are gloablly unique across github so we are using it to determine whether a pull_request we collected is already in the table
# specified in pr_return_columns is the columns of data we want returned. This data will return in this form; {"pr_url": url, "pull_request_id": id}
logger.info(f"{task_name}: Inserting prs of length: {len(pr_dicts)}")
pr_natural_keys = ["pr_url"]
pr_natural_keys = ["repo_id", "pr_src_id"]
pr_return_columns = ["pull_request_id", "pr_url"]
pr_string_fields = ["pr_src_title", "pr_body"]
pr_return_data = session.insert_data(pr_dicts, PullRequest, pr_natural_keys,
Expand Down