Add reviewer, assignee, milestone, and project inputs #5

Merged
stephen merged 1 commit from feat/3-pr-metadata-parity into main 2026-06-17 01:50:32 +00:00
Owner

PR automation could set labels but no other common metadata, so reviewers, assignees, milestones, and project linkage had to be added by hand after the run.

This adds four inputs, applied to a newly created PR alongside labels through the Forgejo API the action already uses:

  • reviewers / assignees: comma/newline lists, validated against the repo's reviewable/assignable users. An unknown name warns and is skipped; the valid names are still applied.
  • milestone: matched by title, or treated as a milestone id when it is all digits. An unknown milestone warns and is skipped.
  • project: by title or numeric id. Linking needs a Forgejo build that exposes the projects API; the current build does not, so the input warns and skips rather than failing.

Metadata is stamped on create only (matching the existing labels behavior), so re-running updates the branch/title/body without re-requesting reviewers or clobbering a milestone set by hand. Every field is best-effort: a bad value or a missing API warns, it never hard-fails the step. Documented in action.yml, the README (new PR metadata section), MIGRATION.md, and the changelog.

Tested with make all: the offline suite gains cases for reviewers + assignees set, an unknown reviewer/assignee (warns, valid still applied), milestone by name and by numeric id, an unknown milestone, no metadata inputs (endpoints omitted), project on a build without the projects API (warns, skips), project on a build with it (linked), an unknown project, and metadata being skipped on update.

Closes #3.

PR automation could set `labels` but no other common metadata, so reviewers, assignees, milestones, and project linkage had to be added by hand after the run. This adds four inputs, applied to a newly created PR alongside `labels` through the Forgejo API the action already uses: - `reviewers` / `assignees`: comma/newline lists, validated against the repo's reviewable/assignable users. An unknown name warns and is skipped; the valid names are still applied. - `milestone`: matched by title, or treated as a milestone id when it is all digits. An unknown milestone warns and is skipped. - `project`: by title or numeric id. Linking needs a Forgejo build that exposes the projects API; the current build does not, so the input warns and skips rather than failing. Metadata is stamped on create only (matching the existing `labels` behavior), so re-running updates the branch/title/body without re-requesting reviewers or clobbering a milestone set by hand. Every field is best-effort: a bad value or a missing API warns, it never hard-fails the step. Documented in action.yml, the README (new PR metadata section), MIGRATION.md, and the changelog. Tested with `make all`: the offline suite gains cases for reviewers + assignees set, an unknown reviewer/assignee (warns, valid still applied), milestone by name and by numeric id, an unknown milestone, no metadata inputs (endpoints omitted), project on a build without the projects API (warns, skips), project on a build with it (linked), an unknown project, and metadata being skipped on update. Closes #3.
Add reviewer, assignee, milestone, and project inputs (#3)
All checks were successful
test / unit (pull_request) Successful in 26s
6df772b71f
Apply reviewers, assignees, milestone, and project to a newly created PR
alongside labels, via the Forgejo API the action already uses. Names are
validated (reviewers/assignees against the repo's reviewable/assignable
users, milestone by title or numeric id), and an unknown value or an
unsupported projects API warns and is skipped rather than failing the step.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/create-pull-request-action!5
No description provided.