[PR #6156] Add workflow to auto-assign maintainers to PRs on comment/review #6357

Closed
opened 2026-02-28 21:27:11 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6156

State: closed
Merged: Yes


Overview

This PR adds a GitHub Actions workflow that automatically assigns maintainers (organization members) to pull requests when they comment or submit a review.

Demo: https://github.com/MatissJanis/actual/pull/17

Changes

  • New workflow (): Triggers on pull_request_review (submitted) and issue_comment (created) events
  • New script (): Node.js script that:
    • Checks if the user is a member of the actualbudget organization
    • Skips if user is the PR author (prevents self-assignment)
    • Skips if user is already assigned (idempotent)
    • Adds the user as an assignee without removing existing assignees

Features

  • Multiple assignees supported - adds without removing existing ones
  • Organization membership verification - only assigns members of actualbudget
  • Self-assignment prevention - skips if user is the PR author
  • Idempotent - gracefully skips if already assigned
  • Error handling - handles permission errors gracefully
  • Secure - uses safe event types (issue_comment/pull_request_review not pull_request_target)

Security

  • Uses safe event types that run in base repository context
  • Verifies organization membership before assigning
  • Handles permission errors gracefully (403 errors)
  • Follows existing workflow patterns and security best practices

Testing

The workflow will automatically trigger when:

  1. A maintainer comments on a PR
  2. A maintainer submits a review on a PR

It will only assign if the user is an organization member and not already assigned.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6156 **State:** closed **Merged:** Yes --- ## Overview This PR adds a GitHub Actions workflow that automatically assigns maintainers (organization members) to pull requests when they comment or submit a review. Demo: https://github.com/MatissJanis/actual/pull/17 ## Changes - **New workflow** (): Triggers on `pull_request_review` (submitted) and `issue_comment` (created) events - **New script** (): Node.js script that: - Checks if the user is a member of the `actualbudget` organization - Skips if user is the PR author (prevents self-assignment) - Skips if user is already assigned (idempotent) - Adds the user as an assignee without removing existing assignees ## Features - ✅ Multiple assignees supported - adds without removing existing ones - ✅ Organization membership verification - only assigns members of `actualbudget` - ✅ Self-assignment prevention - skips if user is the PR author - ✅ Idempotent - gracefully skips if already assigned - ✅ Error handling - handles permission errors gracefully - ✅ Secure - uses safe event types (`issue_comment`/`pull_request_review` not `pull_request_target`) ## Security - Uses safe event types that run in base repository context - Verifies organization membership before assigning - Handles permission errors gracefully (403 errors) - Follows existing workflow patterns and security best practices ## Testing The workflow will automatically trigger when: 1. A maintainer comments on a PR 2. A maintainer submits a review on a PR It will only assign if the user is an organization member and not already assigned.
GiteaMirror added the pull-request label 2026-02-28 21:27:11 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6357