Skip to content

Add automatic GitLab release/milestone detection and robust configuration support

This MR introduces automatic GitLab release detection and several major improvements to enhance the bot's functionality and usability.

Key Features

🚀 Automatic GitLab Release Detection

  • Implements logic to auto-detect the current GitLab release/milestone
  • Based on the rule that releases occur on the third Thursday of each month
  • Minor versions increment monthly and roll over to the next major after .11
  • Base release is 18.0 (May 2025)
  • Falls back to detected release when milestoneFilter is empty

📅 Dynamic Message Date

  • Automatically replaces <<MERGE_DATE>> placeholder in message.md
  • Uses the correct merge date (Monday before the release)

⚙️ Flexible Configuration

  • Support for multiple configuration sources:
    • Config file
    • Environment variables
    • Command-line arguments
  • CLI arguments take precedence over other sources

🔧 Enhanced Developer Experience

  • Improved error handling and logging for easier debugging
  • Comprehensive documentation updates in README
  • Added type hints throughout the codebase
  • Better user experience with clearer error messages

Testing & CI/CD

  • Comprehensive test coverage for:
    • Release calculation logic
    • Merge date calculations
    • Configuration handling
  • Added suggestions and support for scheduled GitLab CI/CD runs

How to test

  1. Run the script without milestoneFilter to verify auto-detection
  2. Test with different configuration methods (file, env vars, CLI)
  3. Verify <<MERGE_DATE>> replacement in message output
  4. Check error handling with invalid inputs
  5. Run the test suite: python -m pytest

Author's checklist

  • Tests added for new functionality
  • Documentation updated (README)
  • Type hints added
  • Error handling improved
  • CI/CD integration documented
Edited by Gabriel Engel

Merge request reports

Loading