cherry-picker icon indicating copy to clipboard operation
cherry-picker copied to clipboard

Always fill out PR title after conflict resolution

Open webknjaz opened this issue 4 years ago • 3 comments

Before this change, cherry-picker used to loose the backported commit message and didn't pass anything to the push_to_remote() method which resulted in sending an API request to GitHub that had an empty title upon resume. This caused GitHub respond with an error.

This code path was only problematic for people having a GitHub token in their env and therefore enjoying the benefits of the PR autocreation.

After this change, cherry-picker picks up the commit message correctly and extracts the proper PR title and body out of it.

webknjaz avatar Feb 05 '21 18:02 webknjaz

@sivel this should fix your problem :point_up:

webknjaz avatar Feb 05 '21 18:02 webknjaz

Please ignore the nightly job, its failure is unrelated to this change. It happens because pytest turns all warnings into errors.

webknjaz avatar Feb 05 '21 18:02 webknjaz

I've confirmed this fixes my issue.

Instead of:

422
{"message":"Validation Failed","errors":[{"resource":"Issue","code":"missing_field","field":"title"}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"}

The PR is properly created.

sivel avatar Feb 05 '21 19:02 sivel