-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,24 @@ | |
|
||
import re, sys | ||
|
||
KEYWORDS = "(Add|Feature|Change|Remove|Codechange|Codefix|Cleanup|Fix|Revert|Doc|Update|Upgrade|Prepare)" | ||
ISSUE = "#\d+" | ||
# Player facing changes: | ||
KEYWORDS = "(Add|" # : Similar to Feature, but for small functionalities. | ||
KEYWORDS += "Change|" # : Changing existing behavior to such an extent as to be player visible. | ||
KEYWORDS += "Doc|" # : Update player-facing documentation contained in `docs/` folder or developer facing documentation in the various markdown files. | ||
KEYWORDS += "Feature|" # : Adding a significant new functionality to the game. This can be small in code-size, but is meant for bigger things from a player perspective. | ||
KEYWORDS += "Fix|" # : Fixing an issue with the game (as seen by the player). | ||
KEYWORDS += "Remove|" # : Completely removing a functionality. | ||
KEYWORDS += "Revert|" # : Reverting an earlier Feature / Add / Change / Fix / Remove. | ||
KEYWORDS += "Update|" # : Translation updates. | ||
|
||
# Developer only visible changes: | ||
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" # | ||
KEYWORDS += "Upgrade)" # | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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? |
||
|
||
ISSUE = "#\\d+" | ||
COMMIT = "[0-9a-f]{4,}" | ||
|
||
MSG_PAT1 = re.compile(KEYWORDS + "$") | ||
|
There was a problem hiding this comment.
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?