This document describes all automated workflows configured for msgtrace-sdk.
File: .github/dependabot.yml
What it does:
- Automatically checks for dependency updates weekly (Mondays at 9am UTC)
- Creates PRs for Python dependencies and GitHub Actions
- Groups OpenTelemetry packages together
- Groups dev dependencies by type (minor/patch)
Labels: dependencies, python, github-actions
Configuration:
- Max 10 PRs for Python deps
- Max 5 PRs for GitHub Actions
- Auto-labeled with
automergefor automated merging
File: .github/workflows/pre-commit-autoupdate.yml
What it does:
- Runs
pre-commit autoupdateweekly (Mondays at 9am UTC) - Creates PR with updated hook versions
- Automatically labeled with
automerge
Triggers:
- Schedule: Weekly (Mondays)
- Manual:
workflow_dispatch
File: .github/workflows/merge-bot.yml
What it does:
- Merges PRs via comment commands (PyTorch-style)
- Updates PR branches with latest changes from base branch
- Waits up to 10 minutes for CI checks to pass
- Checks user permissions (write/admin only)
- Uses squash merge
- Deletes branch after merge
- Interactive feedback with emoji reactions
Commands:
Merge Commands:
@mergebot merge@merge-bot merge/mergemerge
Update Commands (new in v1.0.0):
@mergebot update@merge-bot update/updateupdate
Option 1: Mention the bot
@mergebot merge
or
@merge-bot merge
Option 2: Simple command
/merge
or simply:
merge
What happens when you merge:
- Bot reacts with 🚀 - Shows it's processing
- Checks permissions - Only collaborators with write/admin can merge
- Checks if PR is ready - Can't be draft, can't have conflicts
- Waits for checks - Waits up to 10 minutes for CI, tests, CodeQL, etc.
- Merges PR - Uses squash merge
- Deletes branch - Removes branch automatically
- Bot reacts with 👍 - Confirms success
Update Command Usage:
Use /update or @mergebot update to update your PR branch with the latest changes from the base branch (usually main). This is useful when your PR is behind the base branch.
What happens when you update:
- Bot reacts with 👀 - Shows it's processing
- Checks permissions - Only collaborators with write/admin can update
- Merges base branch - Merges latest changes from base into PR branch
- Pushes changes - Automatically pushes to your PR branch
- Comments with status - Confirms success or failure
- Bot reacts with 👍 (success) or 👎 (failure)
Example:
# PR is behind main branch
# You comment:
/update
# Bot merges main into your PR branch
# Bot comments: "✅ Branch updated successfully by @username!"
Requirements:
- ✅ You must have write or admin access to the repo
- ✅ PR cannot be a draft (for merge)
- ✅ PR cannot have conflicts (for merge)
- ✅ All checks must pass (or bot waits up to 10 min for merge)
Error Messages:
❌ No permission
❌ @user you don't have permission to merge/update PRs.
Only collaborators with write access can use these commands.
Solution: Ask a maintainer.
❌ PR is draft
❌ Cannot merge: PR is still a draft.
Please mark it as ready for review first.
Solution: Click "Ready for review" on the PR.
❌ Conflicts
❌ Cannot merge: PR has conflicts or is not mergeable.
Please resolve conflicts first.
Solution: Resolve conflicts manually.
❌ Checks failed
❌ Cannot merge: The following checks failed:
- ❌ Ruff Lint & Format
- ❌ Test Python 3.10
Please fix the issues and try again.
Solution: Fix errors and push again.
❌ Update conflicts
❌ Failed to update branch with latest changes from `main`.
This usually means there are merge conflicts that need to be resolved manually.
Solution: Merge main locally and resolve conflicts.
⏱️ Timeout
⏱️ Timeout waiting for checks to complete (waited 10 minutes).
You can try the merge command again once checks complete.
Solution: Wait for checks to complete and try again.
Security:
- 🔒 Only collaborators with write access can use commands
- 🔒 Respects branch protection rules
- 🔒 Waits for all required checks
- 🔒 Cannot merge PRs with conflicts
- 🔒 Cannot merge drafts
File: .github/workflows/stale.yml
What it does:
- Marks issues as stale after 60 days of inactivity
- Closes stale issues after 7 days
- Marks PRs as stale after 30 days
- Closes stale PRs after 14 days
- Removes stale label when updated
Exempt labels: keep-open, bug, security, enhancement, help-wanted, in-progress, work-in-progress
Triggers:
- Schedule: Daily at midnight UTC
- Manual:
workflow_dispatch
Files:
.github/workflows/labeler.yml.github/labeler.yml
What it does:
- File-based labeling: Labels based on changed files (sdk, core, tests, docs, ci, dependencies, examples)
- Size labeling: Adds size labels (XS/S/M/L/XL) based on line changes
- Title-based labeling: Detects conventional commit prefixes (feat, fix, docs, etc.)
- Keyword detection: Detects breaking changes, security issues
Labels added automatically:
sdk,core,tests,documentation,ci,dependencies,examplessize/XS,size/S,size/M,size/L,size/XLenhancement,bug,maintenance,refactor,performancebreaking-change,security
File: .github/workflows/codeql.yml
What it does:
- Scans Python code for security vulnerabilities
- Runs on pushes to main, PRs, and weekly schedule
- Uses
security-extendedqueries for comprehensive checking - Reports findings in Security tab
Triggers:
- Push to main
- Pull requests
- Schedule: Weekly (Mondays at 3am UTC)
Results: View in GitHub Security tab
Files:
.github/workflows/release-drafter.yml.github/release-drafter.yml
What it does:
- Automatically drafts release notes based on merged PRs
- Categorizes changes by type (Features, Bug Fixes, Docs, etc.)
- Suggests version bump (major/minor/patch) based on labels
- Lists contributors
Categories:
- 🚀 Features (
enhancement,feat) - 🐛 Bug Fixes (
bug,fix) - 📚 Documentation (
documentation,docs) - 🧪 Tests (
tests,test) - ⚡ Performance (
performance,perf) - 🔧 Maintenance (
maintenance,chore) - 🔐 Security (
security) - 📦 Dependencies (
dependencies)
View: Check GitHub Releases page for draft
File: .github/workflows/changelog.yml
What it does:
- Automatically updates CHANGELOG.md when PRs are merged
- Adds entry under appropriate section (Added/Fixed/Changed/etc.)
- Includes PR title and number
- Commits directly to main
Sections:
- Added (features)
- Fixed (bug fixes)
- Changed (modifications)
- Security (security fixes)
- Deprecated
- Removed
Triggers: When PR is closed and merged to main
| Workflow | Trigger | Frequency | Auto-action |
|---|---|---|---|
| Dependabot | Schedule | Weekly (Mon 9am) | Creates PRs |
| Pre-commit update | Schedule | Weekly (Mon 9am) | Creates PRs |
| Merge Bot | PR comment | On command | Merges PRs |
| Stale bot | Schedule | Daily | Closes stale items |
| Labeler | PR open/update | On PR | Adds labels |
| CodeQL | Push/PR/Schedule | Weekly (Mon 3am) | Security scan |
| Release Drafter | Push to main | On push | Drafts release |
| Changelog | PR merged | On merge | Updates CHANGELOG |
keep-open- Prevents stale bot from closingdependencies- Dependency updatesbreaking-change- Triggers major version bumpsecurity- Security-related changessize/XS,size/S,size/M,size/L,size/XL- PR size indicators
# Comment on PR:
@mergebot merge
# or
/mergegh issue edit <issue-number> --add-label "keep-open"gh workflow run pre-commit-autoupdate.yml- CI Status: Check Actions tab for workflow runs
- Security: Check Security tab for CodeQL findings
- Dependencies: Check Pull Requests for Dependabot updates
- Release Notes: Check Releases page for draft release notes
All automation configurations are in .github/:
.github/
├── dependabot.yml # Dependency updates
├── labeler.yml # File-based labeling rules
├── release-drafter.yml # Release notes configuration
└── workflows/
├── merge-bot.yml # Merge bot (command-based)
├── changelog.yml # Changelog updates
├── codeql.yml # Security scanning
├── labeler.yml # Label automation
├── pre-commit-autoupdate.yml # Pre-commit updates
├── release-drafter.yml # Release drafter
└── stale.yml # Stale bot
To customize automations, edit the respective configuration files and commit changes. Most workflows support manual triggers via workflow_dispatch.
- Use conventional commits for automatic changelog updates
- Use merge bot commands to merge PRs after CI passes
- Use
keep-openlabel for long-running issues/PRs - Review Dependabot PRs before merging (check breaking changes)
- Check CodeQL findings regularly in Security tab