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

Fix github event recollection syntax errors #2979

Merged
merged 1 commit into from
Jan 22, 2025
Merged
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
4 changes: 2 additions & 2 deletions augur/tasks/github/events.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
import traceback

Check warning on line 2 in augur/tasks/github/events.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0611: Unused import traceback (unused-import) Raw Output: augur/tasks/github/events.py:2:0: W0611: Unused import traceback (unused-import)
import sqlalchemy as s

Check warning on line 3 in augur/tasks/github/events.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0611: Unused sqlalchemy imported as s (unused-import) Raw Output: augur/tasks/github/events.py:3:0: W0611: Unused sqlalchemy imported as s (unused-import)
from sqlalchemy.sql import text
from abc import ABC, abstractmethod
from datetime import datetime, timedelta, timezone
Expand All @@ -10,11 +10,11 @@
from augur.application.db.data_parse import *
from augur.tasks.github.util.github_data_access import GithubDataAccess, UrlNotFoundException
from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth
from augur.tasks.github.util.github_task_session import GithubTaskManifest

Check warning on line 13 in augur/tasks/github/events.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0611: Unused GithubTaskManifest imported from augur.tasks.github.util.github_task_session (unused-import) Raw Output: augur/tasks/github/events.py:13:0: W0611: Unused GithubTaskManifest imported from augur.tasks.github.util.github_task_session (unused-import)
from augur.tasks.github.util.util import get_owner_repo
from augur.tasks.util.worker_util import remove_duplicate_dicts
from augur.application.db.models import PullRequestEvent, IssueEvent, Contributor, Repo

Check warning on line 16 in augur/tasks/github/events.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0611: Unused Repo imported from augur.application.db.models (unused-import) Raw Output: augur/tasks/github/events.py:16:0: W0611: Unused Repo imported from augur.application.db.models (unused-import)
from augur.application.db.lib import get_repo_by_repo_git, bulk_insert_dicts, get_issues_by_repo_id, get_pull_requests_by_repo_id, update_issue_closed_cntrbs_by_repo_id, get_session, get_engine, get_core_data_last_collected

Check warning on line 17 in augur/tasks/github/events.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0611: Unused get_session imported from augur.application.db.lib (unused-import) Raw Output: augur/tasks/github/events.py:17:0: W0611: Unused get_session imported from augur.application.db.lib (unused-import)


platform_id = 1
Expand All @@ -31,7 +31,7 @@
if full_collection:
core_data_last_collected = None
else:
repo_id = get_repo_by_repo_git().repo_id
repo_id = get_repo_by_repo_git(repo_git).repo_id

# subtract 2 days to ensure all data is collected
core_data_last_collected = (get_core_data_last_collected(repo_id) - timedelta(days=2)).replace(tzinfo=timezone.utc)
Expand All @@ -43,7 +43,7 @@
else:
collection_strategy = ThoroughGithubEventCollection(logger)

collection_strategy.collect(repo_git, key_auth)
collection_strategy.collect(repo_git, key_auth, core_data_last_collected)

def bulk_events_collection_endpoint_contains_all_data(key_auth, logger, owner, repo):

Expand Down
Loading