Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Why is removing the default necessary?
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.
@webknjaz can we keep the original behavior and let the default commit message?
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.
I don't remember, it was over a year ago. But I think I wanted to prevent situations when a caller would accidentally leave it empty. Why would one want this behavior to be implicit? If a caller wants an empty title, they should state that explicitly instead of relying on the magical empty value. Besides, it's passed to
create_gh_pr()without changes, which already enforces the same.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.
FTR, I've checked that the only known consumer does not call this method directly: https://github.com/python/miss-islington/blob/23841c0b44b84981d0db055e7eb0c61a532b5aa4/miss_islington/tasks.py#L128. And there's probably no other public API user in the wild.
Having no default here is intended to force the callers to always compute the PR title as opposed to allowing it to be empty when forgotten.