This doesn’t seem like a good idea.
One, releasing should be easy. At my last job, you clicked “new release” or whatever on GitHub. It then listed all the commits for you. If you “need” an Ai to summarize the commits, you fucked up earlier. Write better commit messages. Review the changes. Use your brain (something the AI can’t do) to make sure you actually want all of this to go out. Click the button. GitHub runs checks and you’re done.
Most of the time it took a couple minutes at most to do this process.
Call the function from the if block.
Now your tests can more easily call it.
I think at my last job we did argument parsing in the if block, and passed stuff into the main function.