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 syntax error in sql #2933

Merged
merged 1 commit into from
Oct 15, 2024
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
2 changes: 1 addition & 1 deletion 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

Expand All @@ -11,8 +11,8 @@
from augur.tasks.github.util.github_random_key_auth import GithubRandomKeyAuth
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, CollectionStatus

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

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 W0611: Unused CollectionStatus imported from augur.application.db.models (unused-import) Raw Output: augur/tasks/github/events.py:14:0: W0611: Unused CollectionStatus 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

Check warning on line 15 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:15:0: W0611: Unused get_session imported from augur.application.db.lib (unused-import)


platform_id = 1
Expand Down Expand Up @@ -316,7 +316,7 @@
with engine.connect() as connection:

query = text(f"""
select pull_request_id, pr_src_number as gh_pr_number, pr_src_id from pull_requests order by pr_created_at desc; from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc;
select pull_request_id, pr_src_number as gh_pr_number, pr_src_id from pull_requests WHERE repo_id={repo_id} order by pr_created_at desc;
""")

pr_result = connection.execute(query).fetchall()
Expand Down
Loading