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

Closed
opened 2026-04-26 10:07:13 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6156
Author: @MatissJanis
Created: 11/15/2025
Status: Merged
Merged: 11/20/2025
Merged by: @MatissJanis

Base: masterHead: matiss/pr-auto-assign-maintainers


📝 Commits (1)

  • 0e1d11a Add workflow to auto-assign maintainers to PRs on comment/review

📊 Changes

3 files changed (+147 additions, -0 deletions)

View changed files

.github/actions/pr-auto-assign/assign-maintainer.js (+113 -0)
.github/workflows/pr-auto-assign.yml (+28 -0)
upcoming-release-notes/6156.md (+6 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/6156 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 11/15/2025 **Status:** ✅ Merged **Merged:** 11/20/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/pr-auto-assign-maintainers` --- ### 📝 Commits (1) - [`0e1d11a`](https://github.com/actualbudget/actual/commit/0e1d11a74287e32485881853322fd7b8737f16ac) Add workflow to auto-assign maintainers to PRs on comment/review ### 📊 Changes **3 files changed** (+147 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.github/actions/pr-auto-assign/assign-maintainer.js` (+113 -0) ➕ `.github/workflows/pr-auto-assign.yml` (+28 -0) ➕ `upcoming-release-notes/6156.md` (+6 -0) </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-26 10:07:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#48177