python / cherry-picker

🐍🍒⛏ Utility script for backporting/cherry-picking CPython changes from master into one of the maintenance branches.
Apache License 2.0
46 stars 38 forks source link

Set `pr_number` attribute when PR is created for programmatic usage of cherry-picker #57

Closed Jackenmen closed 2 years ago

Jackenmen commented 2 years ago

Simply setting PR number under self.pr_number after successfully creating PR would be enough: https://github.com/python/cherry-picker/blob/6b302ada54087c6838b2decf8b2aba7f63bef346/cherry_picker/cherry_picker.py#L334

In addition to allowing to refer to the PR after the backport, it also allows checking if the PR was actually created successfully which right now is not possible either (unless you catch stdout but that's quite bothersome in comparison to simple API modification in this project).