I am trying to improve a developer workflow, where we keep forgetting to update our CHANGELOG.md file. With every update, we try to maintain an entry in our changelog, so I wanted to find a way to enforce this. I have already tried using Git hooks, or even parsing commits. Neither of those options will work for us, though.
I wanted to know if it is possible for me to somehow disable the ability to merge, if the file CHANGELOG.md is not modified? If so, how would I approach this? Would I need to set up a CI/CD pipeline (not ideal, as we already use Jenkins), or is there something akin to Github Actions, where I can simply run a script when a merge request is opened, which returns true/false?
then in bin/changelog_lint.py we use python-gitlab to look through the MR commits, and produce a report in JUnit format which is nicely displayed in the MR overview page, like a unit test.
I set up this repo to try and verify the CHANGELOG is updated when the pipeline runs,
but I seem to be unable to get a diff that I am able to use in my bash scripts. Any idea on how I can compare the update vs master? Does this need to be in the context of a branch, or merge request?
The eventual goal is to run this on merge request, but wanted to hammer out the logic before that tedious testing.