Skip to content

Migrate PR automation to prtk check#101

Merged
reuterbal merged 1 commit into
ecmwf-ifs:masterfrom
msleigh:dims_migrate-to-prtk-check
Jun 9, 2026
Merged

Migrate PR automation to prtk check#101
reuterbal merged 1 commit into
ecmwf-ifs:masterfrom
msleigh:dims_migrate-to-prtk-check

Conversation

@msleigh

@msleigh msleigh commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

Migrates ecrad's PR automation from the standalone prtk assign-reviewers command to the current prtk check entry point, and adds a checks: section to MAINTAINERS.yml. No Jira and no cycle_leads (this repo doesn't use them).

MAINTAINERS.yml

  • ensure-assignee — every non-draft PR gets one assignee (falls back to reuterbal, the top-level maintainer)
  • validate-target-branch — PRs must target master or develop. PRs against feature branches will be rejected with a clear message
  • assign-reviewers — path-based reviewer requesting, with exclude-author and exclude-existing
  • copyright-audit — advisory comment for suspicious copyright additions, with allowed-holders covering ECMWF and Météo-France variants. Skippable per-PR with the prtk:skip-copyright label

.github/workflows/pr-check.yml

  • Replaces the single prtk assign-reviewers ... step with prtk check ..., passing --default-branch and the GitHub event metadata that the new entry point expects
  • Expands pull_request_target event types to opened, synchronize, reopened, edited, ready_for_review, converted_to_draft so prtk check can react to title edits, draft transitions, etc.
  • Adds issues: write permission (needed by ensure-assignee)
  • Adds a concurrency group so rapid PR updates cancel in-flight runs
  • Adds timeout-minutes: 5

Out of scope

  • No scheduled prtk scan / close-stale workflow. Can be a follow-up if stale-PR cleanup is wanted.

Test plan

  • Open a draft PR against master and confirm the prtk job skips automation (draft handling)
  • Mark the PR ready for review and confirm: one assignee is set, reviewers are requested per MAINTAINERS.yml rules
  • Open a test PR against a non-allowed base branch and confirm validate-target-branch fails with a clear message
  • Edit a PR title and confirm prtk check re-runs on the edited event

@github-actions github-actions Bot requested review from reuterbal and rjhogan May 26, 2026 08:56
Replace the standalone prtk assign-reviewers step with prtk check, the
recommended repository automation entry point in the current version of
prtk. Add a checks: section to MAINTAINERS.yml enabling ensure-assignee,
validate-target-branch (master, develop), assign-reviewers, and
copyright-audit. Expand the workflow event types, add issues: write
permission and a concurrency group, and pass the default branch and
event metadata to prtk check.

Also gate the job with `if: github.repository_owner == 'ecmwf-ifs'`
so PR automation does not run on personal forks.
@msleigh msleigh force-pushed the dims_migrate-to-prtk-check branch from ec57a78 to fa66179 Compare May 26, 2026 13:43
@github-actions github-actions Bot requested a review from reuterbal May 26, 2026 13:43
@reuterbal reuterbal merged commit 983b4fd into ecmwf-ifs:master Jun 9, 2026
13 of 14 checks passed
@reuterbal reuterbal mentioned this pull request Jun 9, 2026
4 tasks
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Automated check: Non-standard copyright statements were detected in added lines. Please resolve them before merge.

MAINTAINERS.yml:18

  copyright-audit:

MAINTAINERS.yml:20

    skip-label: "prtk:skip-copyright"

@reuterbal

Copy link
Copy Markdown
Collaborator

With the branch filter removed (ab8b517), the check for non-allowed base branches succeeds (see #106)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants