Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codefix: Document the allowed commit message prefixes. #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ladysadie
Copy link

Copying over the documentation about commit prefixes from the CODINGSTYLE.md document over to the script that actually enforces that rule.

I made some edits to the language trying to improve conciseness and clarity. If you accept this PR I'll mirror those updates to the CODINGSTYLE.md file.

There's also 2 of the prefixes we need to talk about.

KEYWORDS += "Codefix|" # : Fixing problems in earlier commits that players won't notice: wrong comments, missing files, CI changes.
KEYWORDS += "Cleanup|" # : Similar to Codechange, but when it is more about removing old code, rather than an actual change.
KEYWORDS += "Prepare" #
KEYWORDS += "Upgrade)" #
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenTTD (git) % git log --oneline --grep=Upgrade 1c738e508 Upgrade: [CI] Bump Apple-Actions/import-codesign-certs in the actions group (#12745) 62d7d92a0 Upgrade: [CI] bump the actions group with 9 updates (#11881) 173ed81db Change: [Actions] Upgrade import-codesign-certs dependency in macOS build workflow 1feba55f0 (svn r26613) -Feature: Upgrade currently active newgrfs to newest installed version.

Only 4 uses of this keyword ever. 2 of them not even as a prefix. Based on the usage for "Codefix" it seems like maybe this one can be removed entirely?

KEYWORDS += "Codechange|" # : Changes to the code the player is not going to notice. refactors, modernization, etc.
KEYWORDS += "Codefix|" # : Fixing problems in earlier commits that players won't notice: wrong comments, missing files, CI changes.
KEYWORDS += "Cleanup|" # : Similar to Codechange, but when it is more about removing old code, rather than an actual change.
KEYWORDS += "Prepare" #
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prepare is another prefix that doesn't seem to be used. Or at least not since OpenTTD moved off of SVN to git going by git log:
OpenTTD (git) % git log --oneline --grep=Prepare b085f610e (tag: 14.0-beta3) Doc: Prepare for 14.0-beta3 release (#12018) 60b6c6c7e (tag: 14.0-beta2) Doc: Prepare for 14.0-beta2 release (#11988) 22eed9616 (tag: 14.0-beta1) Doc: Prepare for 14.0-beta1 release (#11964) 1c82200e0 (tag: 13.0-beta2) Doc: Prepare for 13.0-beta2 release (#10149) ac7780af9 Doc: Prepare for 13.0-beta1 release 778e196b5 (tag: 12.0-beta2) Doc: Prepare for 12.0-beta2 release (#9489) 43c4c9d56 Doc: Prepare for 12.0-beta1 release 1e564b333 Codechange: make [Save|Load]Settings() behave more like other Save/Load code (#9335) a252679a1 (tag: 1.11.0-beta1) Doc: Prepare for 1.11.0-beta1 release 18f03a300 (tag: 1.10.0-beta2) Update: Prepare for 1.10.0-beta2 release 3cb7d9703 (svn r27628) -Codechange: Prepare for drawing cursors consisting of multiple sprites. 90892cb66 (svn r26376) -Prepare: 1.4.0-beta5 fa7eb6dc8 (svn r26300) -Prepare: 1.4.0-beta4 aee9abeab (svn r26272) -Prepare: 1.4.0-beta3 a05d548fa (svn r26230) -Prepare: 1.4.0-beta2 1b0bd4575 (svn r23878) -Prepare: 1.2.0-beta4 2583b977c (svn r23831) -Prepare: 1.2.0-beta3 f93c8ce5a (svn r22627) -Codechange: Rename PrepareTextRefStackUsage() to StartTextRefStackUsage() to make it more obvious that you must call StopTextRefStackUsage() at some point. Also extent the documentation. 974c0f516 (svn r21967) -Prepare: for 1.1.0-beta5 e898a6a9f (svn r21749) -Prepare: for 1.1.0-beta3 fe6080650 (svn r21676) -Prepare 1.1.0-beta2 d11bb39f4 (svn r19007) -Prepare: 1.0.0-beta4 02edae545 (svn r18870) -Prepare: 1.0.0-beta3 435ef4ea8 (svn r18734) -Prepare: for 1.0.0-beta2 bd05f2eca (svn r17867) -Codechange: Prepare BaseVehicleListWindow for nested widgets.

Seems like either OpenTTD should use for preparing releases instead of Doc: Prepare or get rid of this prefix from this script? Either way that's above my pay grade?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant