Open AmProsius opened 2 years ago
I added another step:
- Optionally turn the issue into a pull request:
hub pull-request -i XXX
.
I wonder if this should be a local script, that a collaborator triggers on their own machine, or a Github bot that commits the automated changes and turns the issue into a PR once triggered.
The latter would have the advantage that all information is available to the bot, and it can automatically generate all the files.
Great idea! The bot could also turn the PR into a draft after converting the issue.
It would be awesome to somehow encode the necessary info in the issue.
Variables to know:
- Issue number (
XXX
)- Issue name (optional)
- Fix file/function name (
FixFunctionName
)- Fix type (
session
orgamesave
)- English changelog entry
- German changelog entry
Out of those listed above, we have all of them clearly extractable except for
FixFunctionName
)I am sure the bot could parse the issue description and comments for any key words. We'd have to add them manually.
I am sure the bot could parse the issue description and comments for any key words. We'd have to add them manually.
I have no problem with adding both changelog entries to the issue's description (I already write the Expected behavior like the English changelog entry). The fix function name is unfortunate, because it doesn't really belong to the issue's description, but its okay for me to add it for the automation.
To speed up bug fixing, the process to create the new fix can (potentially) be covered with a script. These are the steps to create the files and file changes for a new fix:
git checkout -b bugXXX
../CHANGELOG.md
../docs/changelog_de.md
../src/Ninja/G1CP/Content_G1.src
../src/Ninja/G1CP/Content/patchInit.d
or./src/Ninja/G1CP/Content/Fixes/gamesave.d
respectively../src/Ninja/G1CP/Content/Fixes/Session/
or./src/Ninja/G1CP/Content/Fixes/Gamesave/
respectively../src/Ninja/G1CP/Testsuite.src
../src/Ninja/G1CP/Content/Tests/
.git commit -m "Automatically add files for fix #XXX"
.hub pull-request -i XXX
.Variables to know:
XXX
)FixFunctionName
)session
orgamesave
)auto
ormanual
)Things to consider:
G1CP_XXX_NotMoreThan45Characters
)./*
XXX Issue name
Expected behavior: todo. / func void G1CP_Test_XXX() { G1CP_Testsuite_CheckManual(); / todo: Write checks */ G1CP_Testsuite_CheckPassed();
/ todo: Write the test / };
/*
XXX Issue name
/ func int G1CP_Test_XXX() { / todo: Write checks */ G1CP_Testsuite_CheckPassed();
/ todo: Write the test and adjust the return value / return FALSE; };