Github API examples & templates
Use these vals as a playground to view and fork Github API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
stevekrouse
renderEmails
Email
Forward Render Error Emails to Github & Discord Render sends emails when deploys fail but I want those
notifications to come in our team Discord channel,
and tag our team.
Render doesn't have webhooks for this,
so I set up a Gmail filter and
forward to this email handler val,
which in turn forwards the content to our engineering Discord channel. I also found myself wanting this script to auto-create
Github Issues, assigned to the right person, in our current milestone,
so now this script does that, with @stevekrouse/createIssue as the helper function.
0
elliotbraem
githubActivityReport
HTTP
Github Activity Report Generates an activity report of GitHub events for a specified user.
The report groups events by day, repository, and event type, providing an organized view of the user's activities over a specified date range. Usage Parameters userName (required): The GitHub username for which to generate the activity report. startDate (optional): The start date of the activity report in YYYY-MM-DD format. If not provided, the report includes all events up to the endDate . endDate (optional): The end date of the activity report in YYYY-MM-DD format. If not provided, the report includes all events from the startDate onwards. Response Structure The API returns a JSON response body with the following structure: {
"YYYY-MM-DD": {
"repository_name": {
"event_type": [
{
"id": "event_id",
"created_at": "event_timestamp",
"payload": { /* event payload */ }
},
// More events...
]
},
// More repositories...
},
// More dates...
}
0