contribution command group processes approved contribution issues from GitHub to add or edit internship listings.
process
Process an approved contribution issue (new or edit internship).Path to the GitHub event JSON file (typically
$GITHUB_EVENT_PATH)What it does
This command:- Reads the GitHub issue - Parses the event JSON file
- Detects issue type - Determines if it’s a new listing, edit, or bulk inactive
- Extracts form data - Parses issue body for all fields:
- Company name
- Internship title
- Location(s)
- Application URL
- Category
- Sponsorship status
- Active status
- Advanced degree requirements
- Terms (Summer 2026, etc.)
- Updates listings.json - Adds new listing or updates existing one
- Sets GitHub outputs - Provides commit message and attribution
Supported issue types
The command handles three types of approved issues:- new_internship - Adds a new listing
- edit_internship - Updates an existing listing by URL
- bulk_mark_inactive - Marks multiple listings as inactive (delegates to
listings mark-inactive)
New internship flow
When processing a new internship:- Generates a unique UUID for the listing
- Sets
date_postedto current timestamp - Sets
sourceto the GitHub username of contributor - Auto-classifies category from job title if not provided
- Validates that URL doesn’t already exist
- Appends to listings.json
Edit internship flow
When processing an edit:- Finds existing listing by URL
- Updates only the fields provided in the issue
- Sets
date_updatedto current timestamp - Preserves original
date_posted,source, andid
Category classification
If category is not provided for a new internship, the tool automatically classifies based on the job title:- Titles with “software”, “backend”, “frontend”, “full stack” → Software Engineering
- Titles with “product manager”, “APM” → Product Management
- Titles with “data”, “ML”, “machine learning” → Data Science
- Titles with “quant”, “trading” → Quantitative Finance
- Titles with “hardware”, “embedded”, “firmware” → Hardware Engineering
- Otherwise → Other
GitHub Actions integration
This command is used in the “Contribution Approved” workflow:GitHub outputs
The command sets these output variables for use in the workflow:commit_message- Formatted commit message (e.g., “added listing: Software Engineer at Google”)commit_email- Contributor’s email for attributioncommit_username- Contributor’s GitHub username
Error handling
If the command fails, it:- Outputs error message via GitHub Actions
error_messageoutput - Prints detailed error to console
- Exits with error code for workflow failure
- Duplicate listing - URL already exists (for new internship issues)
- Not found - URL not found in database (for edit issues)
- Invalid issue type - Issue doesn’t have new_internship, edit_internship, or bulk_mark_inactive label
- Parse error - Issue body format is invalid
Related commands
- listings mark-inactive - Bulk mark listings as inactive
- listings validate - Validate data after processing
- readme update - Update READMEs after processing