Python script to attempt to refresh the github PR description with the top commit.
Note: the gh
cli tool permits pretty similar
functionality (plus a TON more), via for example:
# use git log to get the current commit message subject + body, and pass to gh
gh pr edit \
--title "$(git log -n1 --format='%s')" \
--body "$(git log -n1 --format='%b')"
Requires a github token available from git config, eg:
git config github.apitoken <your token>
❯ pip install gh-pr-update-description
❯ gh-pr-update-description
About to update description on https://github.com/foo/bar/pull/128, ready? [Y/n]:
PR successfully updated 🎉 !