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

Add repo_id on gitlab comments #2937

Merged
merged 1 commit into from
Oct 15, 2024
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
3 changes: 2 additions & 1 deletion augur/application/db/data_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ def extract_needed_gitlab_issue_message_ref_data(message: dict, issue_id: int, r
return message_ref_dict


def extract_needed_gitlab_message_data(comment: dict, platform_id: int, tool_source: str, tool_version: str, data_source: str):
def extract_needed_gitlab_message_data(comment: dict, platform_id: int, repo_id: int, tool_source: str, tool_version: str, data_source: str):
"""
Extract specific metadata for a comment from an api response
and connect it to the relevant platform id.
Expand All @@ -1169,6 +1169,7 @@ def extract_needed_gitlab_message_data(comment: dict, platform_id: int, tool_sou
"""

comment_dict = {
"repo_id": repo_id,
"pltfrm_id": platform_id,
"msg_text": comment['body'],
"msg_timestamp": comment['created_at'],
Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/gitlab/issues_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

issue_data = retrieve_all_gitlab_issue_data(repo_git, logger, key_auth)

if issue_data:

Check warning on line 39 in augur/tasks/gitlab/issues_task.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) Raw Output: augur/tasks/gitlab/issues_task.py:39:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
issue_ids = process_issues(issue_data, f"{owner}/{repo}: Gitlab Issue task", repo_id, logger)

return issue_ids
Expand Down Expand Up @@ -319,7 +319,7 @@
}

message_dicts.append(
extract_needed_gitlab_message_data(message, platform_id, tool_source, tool_version, data_source)
extract_needed_gitlab_message_data(message, platform_id, repo_id, tool_source, tool_version, data_source)
)

contributors = remove_duplicate_dicts(contributors)
Expand Down
2 changes: 1 addition & 1 deletion augur/tasks/gitlab/merge_request_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

mr_data = retrieve_all_mr_data(repo_git, logger, key_auth)

if mr_data:

Check warning on line 35 in augur/tasks/gitlab/merge_request_task.py

View workflow job for this annotation

GitHub Actions / runner / pylint

[pylint] reported by reviewdog 🐶 R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return) Raw Output: augur/tasks/gitlab/merge_request_task.py:35:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
mr_ids = process_merge_requests(mr_data, f"{owner}/{repo}: Mr task", repo_id, logger)

return mr_ids
Expand Down Expand Up @@ -244,7 +244,7 @@
}

message_dicts.append(
extract_needed_gitlab_message_data(message, platform_id, tool_source, tool_version, data_source)
extract_needed_gitlab_message_data(message, platform_id, repo_id, tool_source, tool_version, data_source)
)

contributors = remove_duplicate_dicts(contributors)
Expand Down
Loading