Skip to content

ci: auto-apply prod-review label to dev-base PRs - #49

Merged
hakan-persson merged 3 commits into
mainfrom
feat/prod-review-autolabel
Jul 4, 2026
Merged

ci: auto-apply prod-review label to dev-base PRs#49
hakan-persson merged 3 commits into
mainfrom
feat/prod-review-autolabel

Conversation

@hakan-persson

Copy link
Copy Markdown
Member

Adds a small GitHub Actions workflow that tags any PR touching a dev-base manifest (k8s/app-manifest/**) with the prod-review label — so dev changes that can flow to prod through the overlays are never missed for a "carry to prod?" decision.

Why

Prod overlays inherit the dev base, so a dev-side manifest change can reach prod on the next ArgoCD sync. Today catching those relies on remembering to check merged dev PRs (this is how #44#47 were caught by hand). This makes it automatic: the label becomes a self-maintaining triage queue (is:pr label:prod-review).

What

  • .github/labeler.yml — rule: label prod-review when a PR changes k8s/app-manifest/**. The -prod overlay dir and argocd/ changes are excluded (they're prod-side / don't need carrying).
  • .github/workflows/prod-review-label.yml — runs actions/labeler@v5 on PR open/sync/reopen.

Notes

  • Uses pull_request_target so it has permission to write the label, but the job only reads the changed-file list and applies a label — it never checks out or runs PR code, so there's no code-execution risk from forks.
  • sync-labels: false — the label is only added; it stays until deliberately removed after triage (it means "needs a prod decision", not "currently touches a base").
  • First workflow in this repo. The prod-review label already exists.

Part of the dev→prod coupling safety work (companion to the self-contained conversions in #39/#48).

🤖 Generated with Claude Code

Add an actions/labeler workflow that tags any PR touching a dev-base manifest
(k8s/app-manifest/**) with `prod-review`, so dev changes that can flow to prod
via the overlays are never missed for a prod-carry decision. The `-prod`
overlay dir and argocd/ changes are excluded (they don't need carrying).

Uses pull_request_target (so it can write labels) but only reads the changed-
file list — it never checks out or runs PR code. sync-labels: false keeps the
label until it's deliberately removed after triage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 4, 2026 21:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automated PR labeling to ensure changes to the dev-base Kubernetes manifests are surfaced for a “carry to prod?” triage decision, reducing the chance that inherited dev changes reach prod unnoticed.

Changes:

  • Adds a GitHub Actions workflow that runs on PR open/sync/reopen to apply labels.
  • Introduces actions/labeler@v5 configuration to apply prod-review when k8s/app-manifest/** is modified.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/prod-review-label.yml New workflow to run actions/labeler@v5 on pull_request_target PR events and apply labels.
.github/labeler.yml Labeler rules to add prod-review when PRs touch k8s/app-manifest/**.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/labeler.yml Outdated
Address Copilot on #49: the comment implied an explicit exclusion list.
Rewrite it to state that the rule matches only `k8s/app-manifest/**` and that
sibling/unrelated paths (`k8s/app-manifest-prod/**`, `k8s/argocd/**`,
`k8s/infra-manifest/**`) are simply outside the glob, not explicitly excluded.
Comment-only; the rule is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/prod-review-label.yml Outdated
Address Copilot on #49: pin actions/labeler to the full commit SHA
(8558fd7 = v5.0.0) instead of the moving @v5 tag, so a repointed tag can't
change what runs. Version kept in a trailing comment for readability.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hakan-persson
hakan-persson merged commit 00903f3 into main Jul 4, 2026
hakan-persson added a commit that referenced this pull request Jul 4, 2026
Address Copilot on #49: the comment implied an explicit exclusion list.
Rewrite it to state that the rule matches only `k8s/app-manifest/**` and that
sibling/unrelated paths (`k8s/app-manifest-prod/**`, `k8s/argocd/**`,
`k8s/infra-manifest/**`) are simply outside the glob, not explicitly excluded.
Comment-only; the rule is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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