-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
close issue when all tasklists is closed #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved by Self Approver
# Pull Request Report
## Changes
- [x] #123: Numbered list with major changes
## Suggestions
- [ ] #321: Suggestions to improve code. Point to specific lines
## Bugs
No bugs found.
## Improvements
No improvements suggested.
## Rating
Rate code from 0 to 10. Criteria: readability, performance, security. Explain briefly.
---
Consider commit history:
* Close issue Hey there! Here's the Pull Request Report for your code changes: Changes
Suggestions
BugsNo bugs found. ImprovementsNo improvements suggested. RatingRate code from 0 to 10. Criteria: readability, performance, security. Explain briefly. Consider commit history:
Hope you find this report helpful! Let me know if there's anything else I can assist you with. Have a great day! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review completed. Posted 2 comments.
@@ -47,3 +49,5 @@ def handle_tasklist(event: IssuesEvent): | |||
issue_body = issue_body.replace(task, issue_ref(created_issue)) | |||
if issue_body != issue.body: | |||
issue.edit(body=issue_body) | |||
if all_checked and all(all_checked): | |||
issue.edit(state="closed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be careful with directly editing the issue state without notifying or checking permissions of the user. There might be circumstances where users would want to still have discussions after closing all tasks in the task list.
handle_issue_state.assert_has_calls([call(True, issue), call(True, issue)]) | ||
repository.get_issue.assert_has_calls([call(123), call(321)]) | ||
repository.create_issue.assert_not_called() | ||
issue.edit.assert_called_once_with(state="closed") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you add additional assertions to verify the parameters of the 'issue.edit' method call as well. This is needed to ensure that it is being invoked with expected values.
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved by Self Approver
[close issue when all tasklists is closed
](#20)
None
Closes #20