feat(infra): add issue governance workflows #434 #435 #436#442
feat(infra): add issue governance workflows #434 #435 #436#442
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97ccb1778b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await github.rest.issues.addLabels({ | ||
| ...context.repo, | ||
| issue_number: issueNum, | ||
| labels: ['role:manager'] | ||
| }); |
There was a problem hiding this comment.
Avoid forcing
role:manager on backlog epics
This unconditionally re-adds role:manager for every type:epic, which conflicts with the existing backlog rule enforced by .github/workflows/label-lint.yml (status:backlog must have no role:*). Because the epic template creates epics as type:epic + status:backlog, any later label change will trigger this workflow to add role:manager, and label-lint will then fail; removing the role triggers this guard again, so backlog epics become unsatisfiable under the current checks.
Useful? React with 👍 / 👎.
| issues: | ||
| types: [labeled, unlabeled] |
There was a problem hiding this comment.
Trigger Epic role guard when issues are opened
The guard only listens to labeled/unlabeled, so an epic created with type:epic during issue creation is not corrected at creation time. That leaves epics without role:manager until some later label mutation happens, which breaks the stated invariant that epics always carry role:manager and creates inconsistent behavior depending on how the issue was created.
Useful? React with 👍 / 👎.
Summary
Adds three GitHub Actions workflows for issue governance enforcement (all using
actions/github-script@v7, no external trust surface):label-completeness.yml(Add label completeness validator workflow on issue events #434): Validatestype:*,status:*,priority:*,area:*present on all issues. Posts violation comment onissues: [opened, labeled, unlabeled].issue-title-lint.yml(Add issue title format validator on issue create and edit #435): Validates issue title ≤72 chars, no Conventional Commits prefix, no bracket tags. Posts violation comment onissues: [opened, edited].epic-role-guard.yml(Enforce Epic role:manager invariant via issues event workflow #436): Enforcestype:epicissues always carryrole:manager. Auto-re-adds if removed. Posts invariant explanation comment.All three are advisory enforcement (comment + failing check) — GitHub has no hard API gate on issue creation/edit.
Test plan
feat(infra): add something→ title-lint check fails[BUG] something→ title-lint check failsrole:managerfrom an Epic → epic-role-guard re-adds it and posts commentnpm run lintpasses (57, 59, 59 lines respectively)Closes #434
Closes #435
Closes #436
🤖 Generated with Claude Code