A GitHub Action that automatically posts a migration checklist as a comment on pull requests that contain database migration files.
This action monitors pull requests for changes to database migration files (specifically files in db/migrate directories). When migrations are detected, it posts a comprehensive checklist comment to guide developers through the migration deployment process.
- The action examines all files changed in a pull request
- If any files in
db/migratedirectories are detected, it triggers the checklist posting - The action checks if a migration checklist comment has already been posted to avoid duplicates
- If no previous comment exists, it posts the appropriate checklist as a comment on the pull request
- action.yml: GitHub Action configuration defining the action name, inputs, and Docker runtime
- Dockerfile: Container setup with necessary tools (curl, jq) for API interactions
- entrypoint.sh: Main script that handles PR file detection, comment checking, and checklist posting
- checklists/: Directory containing checklist templates
- default.md: Default migration checklist with comprehensive steps for database migrations
- Automatic detection of database migration files in pull requests
- Prevention of duplicate checklist comments
- Support for repository-specific checklists (falls back to default if not found)
- Uses GitHub API for PR interaction with proper authentication
- token: GitHub token for API authentication (required)