WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.3k stars 4.11k forks source link

Cherry Pick script fails on missing `merge_commit_sha` in Github API response #59398

Open getdave opened 6 months ago

getdave commented 6 months ago

During Cherry Picing for WP 6.5 Beta 3 the npm run other:cherry-pick script kept failing with:

Error: Cannot fetch the merge commit sha for #XXXXX

The API request is to https://api.github.com/repos/wordpress/gutenberg/pulls/XXXX.

I check the code and it will fail if merge_commit_sha is not in the response.

Performing this manually using a REST client, I could see that merge_commit_sha was included in the response. So for some reason when running using the script it doesn't include that field for certain PRs.

It seems this field may have been deprecated so we may need to find a better method.

getdave commented 6 months ago

@gziolo Do you have any idea about this one?

cc @youknowriad for information.

gziolo commented 6 months ago

Actually, it's @adamziel who authored the script, so he would be a better person to help here.

adamziel commented 6 months ago

I'm as surprised as you @getdave as this never came up for me before. It seems like we may need a better method than relying on merge_commit_sha indeed.