This val includes several tools for automating GitHub pull request workflows:
PR Auto-Assign: Automatically assigns the PR author as an assignee when a PR is opened
PR Title Prefixer: Automatically prefixes PR titles with the linked issue number
PR Label Inheritor: Automatically copies labels from linked issues to the PR
PR Approval Notifier: Sends notifications to Slack when a PR is approved, with an optional merge button
Slack-GitHub Bug Connector: Finds related GitHub issues when a bug is reported in Slack
PR Automation Vals
See all 3 in actionπ
1. PR Auto-Assign
The github-pr-auto-assign.ts file automatically assigns the PR author as an assignee when a PR is opened.
Setup:
Create a GitHub webhook with the "Pull requests" event
Point it to the auto-assign file URL
Add GITHUB_TOKEN as an environment variable in Val Town with these permissions:
For classic tokens: Include the "repo" scope
For fine-grained tokens: Ensure "Pull requests" has "Read and Write" access
Token must be created by a user with write access to the repository
2. PR Title Prefixer
The github-pr-title-prefix.ts file automatically prefixes PR titles with the linked issue number (inline, in the description) when a PR is opened or edited.
Setup:
Create a GitHub webhook with the "Pull requests" event
Point it to the title prefixer file URL
Ensure your GitHub token has appropriate permissions
3. PR Label Inheritor
The github-pr-inherit-labels.ts file automatically copies labels from linked issues to the PR when a PR is opened or edited.
Setup:
Create a GitHub webhook with the "Pull requests" event
Point it to the label inheritor file URL
Ensure your GitHub token has appropriate permissions
PR Approval Notifier for Slack
The github-slack-pr-approval.ts file sends notifications to Slack when a GitHub pull request is approved, with an optional merge button that appears when all required checks are passing.
See this in actionπ
Setup Instructions
1. GitHub Setup
Create a GitHub Personal Access Token (PAT):
Go to GitHub β Settings β Developer settings β Personal access tokens β Fine-grained tokens