Walle is a GitLab-based release automation tool written in Python that generates release notes and changelogs from GitLab Merge Requests. It follows conventional commit patterns and supports automated release workflows.
- 🚀 Automated Release Notes: Generate release notes from GitLab Merge Requests
- 📝 Changelog Management: Update CHANGELOG.md files automatically
- 🏗️ Batch Processing: Process multiple projects concurrently
- 🎯 Flexible Configuration: Support for JSON config files and environment variables
- 🔗 GitLab Integration: Full GitLab API integration with retry logic
- 📦 Multiple Output Modes: Markdown-only, tag-only, or full release creation
- 🔄 Conventional Commits: Follows conventional commit format for categorization
- ⚡ Concurrent Processing: Multi-threaded processing for optimal performance
# Install from source
pip install -e .
# Or using make
make installCreate a configuration file:
walle init-configExample configuration (walle.json):
{
"gitlab_host": "https://gitlab.com",
"gitlab_token": "your-token-here",
"project": "group/project-name"
}You can also configure using environment variables:
export WALLE_GITLAB_HOST=https://gitlab.com
export WALLE_GITLAB_TOKEN=your-token-here
export WALLE_PROJECT=group/project-name# Create a release with release notes
walle release -p group/project-name -r master -t v1.0.1
# Update changelog
walle changelog -p group/project-name -r master -t v1.0.1 -f CHANGELOG.md
# Generate markdown only (no tags/releases created)
walle release -p group/project-name -r master -t v1.0.1 -mo
# Process multiple projects
walle batch -c batch.jsonCreate releases with automated release notes:
# Basic release
walle release -p group/project-name -r master -t v1.0.1
# Custom starting position
walle release -p group/project-name -r master -t v1.0.1 -s v1.0.0
# Markdown only (no tags/releases)
walle release -p group/project-name -r master -t v1.0.1 -mo
# Tags only (no releases)
walle release -p group/project-name -r master -t v1.0.1 -to
# Save to file
walle release -p group/project-name -r master -t v1.0.1 -mo -o release-notes.mdUpdate CHANGELOG.md files:
# Update changelog
walle changelog -p group/project-name -r master -t v1.0.1 -f CHANGELOG.md
# Custom starting position
walle changelog -p group/project-name -r master -t v1.0.1 -s v1.0.0 -f CHANGELOG.md
# Markdown only
walle changelog -p group/project-name -r master -t v1.0.1 -mo -o changelog-entry.mdProcess multiple projects concurrently:
# Individual markdown files
walle batch -c batch.json -mo -o ./release-notes/
# Product-level merged markdown
walle batch -c batch.json -mo -mm --product-name "My Product v2.0" -o ./
# Create tags only
walle batch -c batch.json -toExample batch configuration (batch.json):
{
"product_name": "My Product v2.0",
"projects": [
{
"project": "group/frontend",
"ref": "master",
"tag": "v1.0.0"
},
{
"project": "group/backend",
"ref": "main",
"tag": "v2.0.0"
},
{
"project": "group/mobile",
"ref": "master",
"tag": "v1.5.0"
}
]
}All commonly used parameters have short aliases:
--project→-p--config→-c--markdown-only→-mo--tag-only→-to--merge-markdown→-mm--output→-o--tag→-t--ref→-r--since→-s
--debug: Enable debug logging--gitlab-host: GitLab host URL--gitlab-token: GitLab API token--config-file: Path to JSON configuration file
Walle expects Merge Request titles to follow conventional commit format:
<type>(<scope>): <title content>
feat→ "New Features:"fix→ "Bug Fix:"refactor→ "Changes:"docs→ "Documentation:"- Others → "Other:"
feat(auth): Add user authentication system
fix(api): Resolve timeout issues in user service
refactor(ui): Modernize component structure
docs: Update API documentation
To exclude a Merge Request from release notes:
- Add the
release-note-nonelabel to the MR - Or include this in the MR description:
```release-note
none
## Advanced Features
### Custom Starting Position
Use `--since` to specify a custom starting point for changelog generation:
```bash
# Use specific tag
walle release -p myproject -r master -t v2.0.0 -s v1.5.0
# Use commit hash
walle release -p myproject -r master -t v2.0.0 -s abc123def456
# Use branch
walle release -p myproject -r master -t v2.0.0 -s feature-branch
When using batch processing with --merge-markdown, release notes are combined by category:
# My Product v2.0 Release Notes
**Bug Fixes:**
- **frontend**: Fix login form validation issue (!123)
- **backend**: Resolve database connection timeout (!456)
- **mobile**: Fix crash on startup (!789)
**New Features:**
- **frontend**: Add dark mode support (!124)
- **backend**: Implement new API endpoint (!457)
- **mobile**: Add biometric authentication (!790)Walle searches for configuration files in this order:
walle.json(current directory).walle.json(current directory)~/.walle.json(home directory)~/.config/walle/config.json/etc/walle/config.json
# Install dependencies
pip install -e .
# Install development dependencies
pip install -r requirements-dev.txt# Format code
make format
# Lint code
make lint
# Type checking
black --check walle/
flake8 walle/
mypy walle/# Run tests
make test
# Or directly
pytest tests/# Clean build artifacts
make clean
# Build package
python setup.py buildYour GitLab token requires the following permissions:
api: Full API accessread_api: Read API accessread_repository: Read repository contentwrite_repository: Create tags and releases
stages:
- release
release:
stage: release
image: python:3.9
before_script:
- pip install walle
variables:
WALLE_GITLAB_TOKEN: $GITLAB_TOKEN
WALLE_GITLAB_HOST: $CI_SERVER_URL
script:
- walle release -p $CI_PROJECT_PATH -r $CI_COMMIT_SHA -t $CI_COMMIT_TAG
only:
- tags
- /^v[0-9]+\.[0-9]+\.[0-9]+$/name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install Walle
run: pip install walle
- name: Create Release
env:
WALLE_GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
WALLE_GITLAB_HOST: https://gitlab.com
run: |
walle release -p group/project -r ${{ github.sha }} -t ${{ github.ref_name }}# 1. Create configuration
walle init-config
# 2. Edit walle.json with your settings
# 3. Create a release
walle release -p mygroup/myproject -r master -t v1.0.0
# 4. Update changelog
walle changelog -p mygroup/myproject -r master -t v1.0.0 -f CHANGELOG.md# 1. Create batch configuration
cat > batch.json << EOF
{
"product_name": "My Product Suite v2.0",
"projects": [
{"project": "mygroup/frontend", "ref": "master", "tag": "v2.0.0"},
{"project": "mygroup/backend", "ref": "main", "tag": "v2.0.0"},
{"project": "mygroup/mobile", "ref": "master", "tag": "v2.0.0"}
]
}
EOF
# 2. Process all projects with merged output
walle batch -c batch.json -mo -mm -o ./product-release-notes.md
# 3. Create tags for all projects
walle batch -c batch.json -to- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.txt file for details.
See CHANGELOG.md for a detailed history of changes.