Synopsis
Django’s contribution workflow involves several manual tasks, such as tracking active PRs, identifying stale PRs, and prioritizing important contributions. These processes take up valuable time for maintainers and contributors.
This project aims to automate PR management using GitHub Actions and the GitHub API to reduce manual effort and improve workflow efficiency.
Benefits to the Community
- Improved PR Management – Ensures active PRs get attention faster.
- Reduced Manual Work – Automates repetitive triaging tasks.
- Better Contributor Experience – Contributors receive timely feedback.
- More Efficient Review Process – Helps maintainers manage PRs more effectively.
Deliverables
Phase 1: Research & Initial Implementation
- Analyze Django’s current PR workflow & challenges.
- Develop a GitHub Action to track active PRs based on engagement.
- Implement automated stale PR detection & notifications.
Phase 2: Enhancements & Prioritization
- Improve PR ranking system based on approvals, activity, and urgency.
- Enhance labeling automation for better triaging.
- Ensure compatibility with Django’s existing contribution workflow.
Final Phase: Optimization & Documentation
- Refine automation based on community feedback.
- Add comprehensive documentation for maintainers.
- Submit PRs to integrate automation into Django’s workflow.
Technical Details
- GitHub Actions – Automate PR triaging & stale detection.
- GitHub API & Python – Fetch PR metadata and automate labeling.
- YAML Workflows – Define automation steps.
- Webhooks & Notifications – Trigger updates based on PR activity.
Example GitHub Action Workflow:
name: PR Management Bot
on:
schedule:
- cron: "0 0 * * 1" # Runs weekly
jobs:
check-prs:
runs-on: ubuntu-latest
steps:
- name: Fetch PR Data
uses: octokit/request-action@v2.x
with:
route: GET /repos/django/django/pulls
- name: Label Stale PRs
run: python scripts/label_stale_prs.py
Timeline
- Community Bonding (May-June): Engage with Django contributors, finalize automation goals.
- June (Weeks 1-2): Implement GitHub Action for PR tracking.
- July (Weeks 3-4): Automate stale PR notifications & prioritization.
- August (Final Phase): Optimize, test, and submit PRs.
Expected Outcomes
- A GitHub Action that automatically labels and tracks PRs based on activity.
- A Python script that uses GitHub API to identify important PRs.
- Clear documentation for maintainers on how to use these automation tools.
Questions for Feedback:
- Would this automation align with Django’s existing contribution workflow?
- Are there specific PR management pain points that should be prioritized?
- Any suggestions or improvements before finalizing the proposal?
Looking forward to your thoughts!