This GitLab bot is designed to help you never forget your changelog entry again by automatically creating a changelog entry for your merge request.
Create a .env file with the environment variables specified in src/config/index.js. The required environment variables are:
GITLAB_SECRET- The secret token you have to set in your GitLab webhookGITLAB_API_URL- Your GitLab API URLGITLAB_ACCESS_TOKEN- Your GitLab access tokenOPENAI_API_KEY- Your OpenAI API keyPORT- Server port (optional, defaults to 3000)HOST- Server host (optional, defaults to 0.0.0.0)CHANGELOG_LOCATION- Changelog file location (optional, defaults to docs/changelog.md)
You need to create two webhooks in your GitLab project, pointing to the endpoints /changelog and /quiz.
The webhook should use the URL: https://your-bot-or-ngrok-url.com/changelog
-
Changelog Reminder: Select "Merge Requests" as the trigger. This runs when you create a new merge request that's not a draft and posts a reminder comment to add a changelog entry.

-
Changelog Creation: Select "Comments" as the trigger. This runs when a comment containing
!changelogis created on a merge request. The bot will generate a changelog entry using AI based on the changes made and attempt to parse the issue number from the merge request description.
The webhook should use the URL: https://your-bot-or-ngrok-url.com/quiz
- Quiz Prompt: Select "Merge Requests" and "Comments" as the trigger. When you open a merge request, a comment with the prompt to use
!quizappears.
- Questions: After typing
!quiz, we generate a few multiple-choice questions about the code. The comments will be next to the code and can be answered with a, b, or c. This triggers another event and we check your answer and give you feedback.
If you are running the bot locally, you can use ngrok http 3000 or bun expose to create a tunnel to your local machine. To start the application, run bun start.
- Add more context with Jira Ticket information
- Instead of creating a commit for the changelog entry, create a comment on the merge request with a suggested changelog entry
- Add support for quiz questions
- Add support for quoting code directly in the question
- [] Verify right code is quoted (currently only the first line of the code is quoted)
- Add all questions immediately instead of one by one
- Improve storing of questions (currently only in memory, should be stored in a database for persistence)
- Add support for quoting code directly in the question
- Test the bot with more complex merge requests (real code repositories, not just the example repository)