Persist team assignment.#10
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces the capability to persist team assignments across different session states and recovery scenarios. By integrating Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly implements the persistence of team_assignment across session creation and recovery for both Gitea and GitHub bridges. The changes to the Session model and SessionManager are also appropriate. I've added a few suggestions to improve code conciseness and maintainability in the recovery logic and model deserialization.
| team_assignment = None | ||
| if issue["number"] in state.issues: | ||
| team_assignment = state.issues[issue["number"]].team_assignment |
There was a problem hiding this comment.
For improved conciseness and readability, you can use dict.get() to retrieve the issue_state and then access team_assignment from it. This avoids the multi-line if block and is more idiomatic.
issue_state = state.issues.get(issue["number"])
team_assignment = issue_state.team_assignment if issue_state else None| team_assignment = None | ||
| if issue.number in state.issues: | ||
| team_assignment = state.issues[issue.number].team_assignment |
There was a problem hiding this comment.
| team_assignment = None | ||
| team_data = data.get("team_assignment") | ||
| if team_data: | ||
| from firewood.team.models import IssueTeamAssignment | ||
|
|
||
| team_assignment = IssueTeamAssignment.from_dict(team_data) |
There was a problem hiding this comment.
This block can be made more concise. You can use the walrus operator := (Python 3.8+) to combine getting and checking team_data. Additionally, while local imports are acceptable for avoiding circular dependencies, it's stylistically better to have them at the top of the function rather than inside a conditional.
| team_assignment = None | |
| team_data = data.get("team_assignment") | |
| if team_data: | |
| from firewood.team.models import IssueTeamAssignment | |
| team_assignment = IssueTeamAssignment.from_dict(team_data) | |
| team_assignment = None | |
| if team_data := data.get("team_assignment"): | |
| from firewood.team.models import IssueTeamAssignment | |
| team_assignment = IssueTeamAssignment.from_dict(team_data) |
Signed-off-by: Klaus Ma <[email protected]>
- Add emma (TPM), frank (dev), grace (dev), henry (arch), ivy (qa) - Remove Background section from all member profiles - Enhance Expertise with specific tools and methodologies - Replace Communication Style with role-appropriate styles: - TPM: Management Style - Arch: Design Style - Dev: Coding Style - QA: Testing Style
69302ae to
c8a6579
Compare
…us operator Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <[email protected]>
Signed-off-by: Klaus Ma <[email protected]>
No description provided.