Skip to content

Commit

Permalink
Add repo to issues/pr fetched message
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo385 committed Dec 27, 2024
1 parent 4cb7e3c commit ac951cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lazy_github/lib/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from textual.message import Message

from lazy_github.lib.github.repositories import RepositorySortKey
from lazy_github.models.github import (
Branch,
FullPullRequest,
Expand Down Expand Up @@ -52,7 +53,8 @@ class IssuesAndPullRequestsFetched(Message):
then send that message to both sections of the UI.
"""

def __init__(self, issues_and_pull_requests: list[Issue]) -> None:
def __init__(self, repo: Repository, issues_and_pull_requests: list[Issue]) -> None:
self.repo = repo
self.issues_and_pull_requests = issues_and_pull_requests
super().__init__()

Expand Down
2 changes: 1 addition & 1 deletion lazy_github/ui/screens/primary.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ async def fetch_issues_and_pull_requests(self, repo: Repository) -> None:
except GithubApiRequestFailed:
lg.exception("Error fetching issues and PRs from Github API")
else:
issue_and_pr_message = IssuesAndPullRequestsFetched(issues_and_pull_requests)
issue_and_pr_message = IssuesAndPullRequestsFetched(repo, issues_and_pull_requests)
self.pull_requests.post_message(issue_and_pr_message)
self.issues.post_message(issue_and_pr_message)

Expand Down

0 comments on commit ac951cf

Please sign in to comment.