Skip to content

chore: add CODEOWNERS for default review routing#196

Merged
BenGWeeks merged 8 commits into
mainfrom
chore/codeowners-pr-lint
May 5, 2026
Merged

chore: add CODEOWNERS for default review routing#196
BenGWeeks merged 8 commits into
mainfrom
chore/codeowners-pr-lint

Conversation

@BenGWeeks
Copy link
Copy Markdown
Contributor

@BenGWeeks BenGWeeks commented May 1, 2026

Summary

Adds .github/CODEOWNERS making @EdiWeeks the default reviewer for the whole repo, so new PRs auto-request a review.

The PR Lint workflow and refreshed PR template referenced in the original description landed separately in #197 and are already on main; this PR is now scoped to just CODEOWNERS.

Test plan

  • Open a fresh PR after merge — confirm @EdiWeeks is auto-requested as reviewer.

🤖 Generated with Claude Code

BenGWeeks and others added 2 commits May 1, 2026 09:28
Adds @EdiWeeks as default code owner for the whole repo, a PR Lint
GitHub Action that enforces Conventional Commits titles, a non-trivial
body, a Fixes #N reference (for feature PRs) and a Test plan section,
and rewrites the PR template to match those rules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the PR Lint workflow with the zapdesk version verbatim:
- Bots (dependabot, github-actions) now skip with exit 0 inside the
  step so the required check still reports "success" instead of
  "skipped" (which would block bot PRs under branch protection).
- Test-plan content stripping uses perl -0pe to handle multi-line
  HTML comment blocks; the previous sed -based version let
  template-only test plans pass.
- Job name is now "Title, body and issue link" — branch-protection
  required-check name updated to match.

Also brings the PR template and CODEOWNERS comments in line with the
zapdesk repo so all three KnowAll repos read the same.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds repo hygiene/automation to standardize PR metadata and enforce review ownership, improving consistency of PR titles/bodies and routing reviews via CODEOWNERS.

Changes:

  • Introduces a PR lint GitHub Action to validate PR title format, body length, required issue linkage (for certain prefixes), and presence/content of a ## Test plan section.
  • Refreshes the PR template to pre-fill the sections the PR lint workflow enforces.
  • Adds a default CODEOWNERS rule to auto-request review from the designated owner.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pr-lint.yml Adds a PR metadata linter workflow for title/body/issue link/test plan enforcement.
.github/PULL_REQUEST_TEMPLATE.md Updates the PR template to match the linter’s required structure (Fixes + Test plan).
.github/CODEOWNERS Adds default code ownership for the repository to drive reviewer assignment.

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

Comment thread .github/workflows/pr-lint.yml
Comment thread .github/workflows/pr-lint.yml
BenGWeeks added a commit that referenced this pull request May 1, 2026
The `Title, body and issue link` status check is required by branch
protection on `main`, but the workflow file landing in #196 isn't on
`main` yet, so this PR has no way to satisfy the check. Pulling the
identical workflow file in here so the lint runs on this PR too. The
file content matches #196 verbatim — when one PR merges first the
other will be a no-op for this path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@BenGWeeks BenGWeeks requested a review from EdiWeeks May 1, 2026 16:13
Copilot flagged that the comments described the title rule as
"conventional-commit style", but the regex only accepts the bare
`<type>: <subject>` form — not full Conventional Commits with scope
(`feat(auth): ...`) or breaking-change marker (`feat!: ...`).

Reword the workflow comments and the user-facing error message to
make the narrowing explicit. Regex behaviour is unchanged so PR
titles remain uniform across the knowall-ai repos that share this
workflow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
BenGWeeks added a commit that referenced this pull request May 1, 2026
Copilot flagged two issues on this PR:

1. The workflow enforces a `## Test plan` heading, but the repo's
   current PR template uses `## Testing`. Without bringing the
   matching template change here, merging this PR before #196 would
   leave the lint failing for every PR opened against the live
   template. Pulling the updated `.github/PULL_REQUEST_TEMPLATE.md`
   from #196's branch so the two artefacts stay in sync.
2. The local copy of `pr-lint.yml` on this branch was a snapshot
   taken before the comment-rewording fix landed on #196 (ff4d6e6).
   Refresh from origin/chore/codeowners-pr-lint so the two branches
   carry identical workflow content — whichever PR merges first
   lands the file; the other becomes a no-op for that path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
BenGWeeks added a commit that referenced this pull request May 1, 2026
* docs: clarify release flow and who can deploy what

Branch protection on main now blocks non-admins from the
documented `git push && git push --tags` release one-liner.
Adds:

- A NOTE that the one-liner only works for repo admins.
- A "Releasing as a non-admin (via PR)" section showing how to
  bump the version on a branch, get it merged, then push the tag.
- A "Who can deploy what" table summarising the permissions
  required for slot deploys, version bumps, tag pushes and the
  (currently absent) production environment gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: address Copilot review comments on PR #197

- Non-admin release flow: bump package.json with
  `npm version --no-git-tag-version` and tag the merge commit on
  `main` after the PR is merged. Avoids the squash/rebase-merge
  pitfall where a pre-created tag would point at a commit that
  never lands on main.
- Note that the GitHub CLI is optional and the PR can be opened
  from the web UI instead.
- Soften the "tag must point at a commit on main" claim to a team
  convention — the workflow does not enforce reachability.
- Reword the production environment gate row to reflect that
  `deploy-production.yml` does not currently declare
  `environment: production`, so reviewers on the Actions
  environment would not gate the workflow without a workflow
  change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: include pr-lint workflow so the required check runs on this branch

The `Title, body and issue link` status check is required by branch
protection on `main`, but the workflow file landing in #196 isn't on
`main` yet, so this PR has no way to satisfy the check. Pulling the
identical workflow file in here so the lint runs on this PR too. The
file content matches #196 verbatim — when one PR merges first the
other will be a no-op for this path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: include matching PR template and latest workflow wording

Copilot flagged two issues on this PR:

1. The workflow enforces a `## Test plan` heading, but the repo's
   current PR template uses `## Testing`. Without bringing the
   matching template change here, merging this PR before #196 would
   leave the lint failing for every PR opened against the live
   template. Pulling the updated `.github/PULL_REQUEST_TEMPLATE.md`
   from #196's branch so the two artefacts stay in sync.
2. The local copy of `pr-lint.yml` on this branch was a snapshot
   taken before the comment-rewording fix landed on #196 (ff4d6e6).
   Refresh from origin/chore/codeowners-pr-lint so the two branches
   carry identical workflow content — whichever PR merges first
   lands the file; the other becomes a no-op for that path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 1, 2026 19:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces repository ownership routing via GitHub’s CODEOWNERS mechanism to auto-request reviews based on file path.

Changes:

  • Add .github/CODEOWNERS with a repo-wide default code owner.

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

Comment thread .github/CODEOWNERS
Copilot AI review requested due to automatic review settings May 5, 2026 16:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 1 out of 1 changed files in this pull request and generated 1 comment.


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

Comment thread .github/CODEOWNERS
@EdiWeeks EdiWeeks changed the title chore: add CODEOWNERS, PR Lint workflow and refreshed PR template chore: add CODEOWNERS for default review routing May 5, 2026
@BenGWeeks BenGWeeks merged commit 829117d into main May 5, 2026
4 checks passed
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.

3 participants