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

close issue when all tasklists is closed #66

Merged
merged 2 commits into from
Jan 17, 2024
Merged

Conversation

bartholomew-smith[bot]
Copy link
Contributor

[close issue when all tasklists is closed

](#20)

None

Closes #20

@bartholomew-smith bartholomew-smith bot enabled auto-merge (squash) January 17, 2024 06:03
heitorpolidoro
heitorpolidoro previously approved these changes Jan 17, 2024
Copy link
Owner

@heitorpolidoro heitorpolidoro left a 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

Copy link

# 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

  • #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

Hope you find this report helpful! Let me know if there's anything else I can assist you with. Have a great day! 😄

This commit fixes the style issues introduced in 80dd84d according to the output
from Black and isort.

Details: #66
Copy link

@prplex prplex bot left a 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")
Copy link

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")
Copy link

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.

Copy link

sonarcloud bot commented Jan 17, 2024

Copy link
Owner

@heitorpolidoro heitorpolidoro left a 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

@bartholomew-smith bartholomew-smith bot merged commit 13ee654 into master Jan 17, 2024
13 checks passed
@bartholomew-smith bartholomew-smith bot deleted the issue-20 branch January 17, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

close issue when all tasklists is closed
1 participant