Skip to content

Commit

Permalink
Flesh out merge PR flow a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo385 committed Dec 21, 2024
1 parent c52ea72 commit 206e96a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion lazy_github/models/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class FullPullRequest(PartialPullRequest):
diff_url: str



class PullRequestMergeResult(BaseModel):
sha: str
merged: bool
Expand Down
9 changes: 7 additions & 2 deletions lazy_github/ui/widgets/pull_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
CheckStatusState,
FullPullRequest,
PartialPullRequest,
PullRequestMergeResult,
)
from lazy_github.ui.screens.lookup_pull_request import LookupPullRequestModal
from lazy_github.ui.screens.new_comment import NewCommentModal
Expand Down Expand Up @@ -180,7 +179,13 @@ async def action_merge_pull_request(self) -> None:
)
if merge_result.merged:
lg.info(f"Merged PR {self.pr.number} in repo {self.pr.repo.full_name}")
self.notify(f"Pull request {self.pr.number} merged", title="PR Merged")
self.notify(
f"Pull request {self.pr.number} merged. Note some cached information on the UI may be out of date.",
title="PR Merged",
)

# This will force refetch the updated information about the PR for the UI
self.post_message(PullRequestSelected(self.pr))
else:
lg.warning(f"Failed to merge PR {self.pr.number} in repo {self.pr.repo.full_name}")
self.notify(
Expand Down

0 comments on commit 206e96a

Please sign in to comment.