Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Jetpack changelog script - commit new changelog right away #32510

Open simison opened 1 year ago

simison commented 1 year ago

Impacted plugin

None / Other

What

Commit new changelog entry created with jetpack changelog right away

How

Let's assume folks are in the right branch, ready to continue by committing the changelog they just created.

Now we commit changelogs manually:

$ jetpack changelog add
...
Command 'add' for plugins/jetpack completed succesfully!

$ git add .
$ git commit -m "Changelog"

I'd expect the script to do it for me to save few commands:

$ jetpack changelog add
...
Changelog for plugins/jetpack added, and commited to the current branch.

If you need an escape hatch, just:

 jetpack changelog add --no-commit
anomiex commented 1 year ago

Personally I'd rather not have it automatically doing git commit -m. Often enough I have other changes already waiting that need a different commit message, or I want to --amend the changelog update to them before the initial push to GH.

simison commented 1 year ago

Often enough I have other changes already waiting that need a different commit message

I meant to include only the changelog file, and leave the rest for the dev to commit.

You'd also want to check you're not in trunk branch, or if there are already changes staged for commit, before doing anything.

simison commented 1 year ago

Oh and could also just be --commit opt-in instead of opt-out. :-)