Add prtk PR automation#13
Open
msleigh wants to merge 2 commits into
Open
Conversation
Add MAINTAINERS.yml and a check-pr.yml workflow that runs prtk check
on PR events. This repository previously had no PR automation.
The checks: section enables:
- ensure-assignee
- validate-target-branch (main, main_staging, openifs-*, lts/*,
mts/*, release/*)
- assign-reviewers (exclude-author, exclude-existing)
- copyright-audit (advisory; ECMWF holders allowed; Adehill as
reviewer-of-record)
openifs does not use Jira, so no require-jira-ticket / sync-jira
checks are enabled and the workflow does not pass JIRA_TOKEN.
The workflow's pull_request_target trigger filter mirrors the
validate-target-branch allowed list, so the check fires on every PR
that should be policy-checked. The job is gated with
`if: github.repository_owner == 'ecmwf-ifs'` so PR automation does not
run on personal forks.
7e2559f to
7b8c12e
Compare
The workflow no longer filters PRs by base branch. It now fires on every PR, leaving prtk's validate-target-branch check inside MAINTAINERS.yml as the sole policy gate. A narrower trigger would skip the workflow entirely on disallowed bases, so validate-target-branch could never flag mis-targeted PRs (the workflow would simply never run on them). Keeping the trigger broad and letting prtk decide gives consistent feedback regardless of target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
prtkPR automation to openifs. This repository previously had noMAINTAINERS.ymland no PR check workflow, so this PR introduces both. openifs does not have a Jira project tied to it, so norequire-jira-ticket/sync-jirachecks are enabled.MAINTAINERS.yml(new)owner: ecmwfmaintainers: [Adehill]— assignee fallback forensure-assignee, contributes to the reviewer poollead_developers, nocycle_leadsensure-assignee— every non-draft PR gets one assignee (falls back toAdehill)validate-target-branch— allowed bases aremain,main_staging, and the patternsopenifs-*,lts/*,mts/*,release/*. Mirrors the existing trigger filter used bydocker-test.ymlassign-reviewers— withexclude-authorandexclude-existingcopyright-audit— advisory;Adehillis the reviewer-of-record;allowed-holdersisECMWFonly (no Météo-France, per the openifs distribution's scope); skippable via theprtk:skip-copyrightlabel.github/workflows/check-pr.yml(new)pull_request_targettriggered onopened, synchronize, reopened, edited, ready_for_review, converted_to_draftagainst the same branch set asvalidate-target-branchallowsif: github.repository_owner == 'ecmwf-ifs'so the workflow does not fire on personal forkscontents: read,pull-requests: write,issues: writeprtkviauv tool installusing the org-levelPRTK_READ_ACCESSsecretJIRA_TOKENsince this repo has no Jira integrationprtk check ...with--default-branchand event metadata soprtkfetches canonicalMAINTAINERS.ymlfrom the default branch (main)Required secrets
PRTK_READ_ACCESSis an org-level secret onecmwf-ifsand is already inherited by this repo — no per-repo configuration needed.When the new behaviour takes effect
This PR targets
main, the repository's default branch.prtk checkreads canonicalMAINTAINERS.ymlfrom the default branch, so once this PR merges the new policy is immediately whatprtkconsults — nomain_staging → mainpropagation lag.Test plan
Run these immediately after merge:
mainand confirm theprtkjob skips automationAdehill), reviewers are requested per the rulesmain,main_staging,openifs-*,lts/*,mts/*,release/*) and confirmvalidate-target-branchfailsWorkflow trigger / policy split
The workflow has no
branches:filter onpull_request_target— it fires on every PR regardless of target.prtk'svalidate-target-branch(allowed:main,main_staging,openifs-*,lts/*,mts/*,release/*) is the sole policy gate. A narrower trigger would silently skip the check on disallowed bases (the workflow would simply never run on them), so users opening PRs to wrong targets would get no feedback at all.