GitHub - Slack - Asana Automation

Webhook automation for GitHub PRs with Slack notifications and Asana task syncing.

Features

  • PR Assignment: Auto-assigns one teammate or another when PR marked ready for review
  • Review Reassignment: Reassigns PR back to author after approval/rejection
  • Slack Notifications: Posts when PRs are opened and ready for review
  • Asana Integration: Replaces Asana URLs with task titles, adds PR links to tasks

Setup

  1. Environment Variables:

    • GITHUB_TOKEN - GitHub Personal Access Token
    • SLACK_WEBHOOK - Slack webhook URL
    • ASANA_API_TOKEN - Asana Personal Access Token
  2. GitHub Token Permissions (Fine-grained):

    • Pull requests: Read and Write
    • Issues: Read and Write
    • Contents: Read
    • Metadata: Read
  3. Configure Reviewers: Update REVIEWERS array in github.ts with your team members

  4. GitHub Webhook:

    • URL: https://your-val-town-url.web.val.run/webhook (note the /webhook)
    • Events: Pull requests, Pull request reviews

Files

  • main.ts - Hono webhook handler, sends messages to Slack
  • github.ts - GitHub API functions
  • asana.ts - Asana API functions